summaryrefslogtreecommitdiff
path: root/lib/Multi/API.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2021-03-07 18:14:46 +0100
committerYorhel <git@yorhel.nl>2021-03-11 11:07:34 +0100
commit24fa3ee0bd54f8342345fb785ea87bac59df45d8 (patch)
tree33ab463c32a71ec203fcda5d9fc37bd048a05e20 /lib/Multi/API.pm
parentf0bbc8b2e4f93b5aed098f97f9965f2aa0c215ae (diff)
Tags: Convert to vndbids + add edit histories
Another commit with changes all across the tree. But at least we have a tangible improvement now: edit histories for tags.
Diffstat (limited to 'lib/Multi/API.pm')
-rw-r--r--lib/Multi/API.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Multi/API.pm b/lib/Multi/API.pm
index 96ed9c65..c7110585 100644
--- a/lib/Multi/API.pm
+++ b/lib/Multi/API.pm
@@ -502,7 +502,7 @@ my %GET_VN = (
sub { my($r, $n) = @_;
for my $i (@$r) {
$i->{tags} = [ map
- [ $_->{id}*1, 1*sprintf('%.2f', $_->{score}), 1*sprintf('%.0f', $_->{spoiler}) ],
+ [ idnum($_->{id}), 1*sprintf('%.2f', $_->{score}), 1*sprintf('%.0f', $_->{spoiler}) ],
grep $i->{id} eq $_->{vid}, @$n ];
}
},
@@ -587,8 +587,8 @@ my %GET_VN = (
join => ' AND ', serialize => 'v.c_search LIKE :value:', process => \'like' ],
],
tags => [
- [ int => 'v.id :op:(SELECT vid FROM tags_vn_inherit WHERE tag = :value:)', {'=' => 'IN', '!=' => 'NOT IN'}, range => [1,1e6] ],
- [ inta => 'v.id :op:(SELECT vid FROM tags_vn_inherit WHERE tag IN(:value:))', {'=' => 'IN', '!=' => 'NOT IN'}, join => ',', range => [1,1e6] ],
+ [ int => 'v.id :op:(SELECT vid FROM tags_vn_inherit WHERE tag = :value:)', {'=' => 'IN', '!=' => 'NOT IN'}, process => \'g' ],
+ [ inta => 'v.id :op:(SELECT vid FROM tags_vn_inherit WHERE tag IN(:value:))', {'=' => 'IN', '!=' => 'NOT IN'}, join => ',', process => \'g' ],
],
},
);