summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2022-08-02 07:00:25 +0200
committerYorhel <git@yorhel.nl>2022-08-02 07:00:27 +0200
commit15fe576238ac08547d890567a8a2dd3fb71d5ace (patch)
tree2c4b2156c70df48be422a7d6065412f8df632af9 /lib
parentae5ac99a3583632440981930fcaf7f6131efb008 (diff)
AdvSearch: fix rtype release filter when nested inside VN filter
So that it only consideres the rtype as it's actually linked to the VN, rather than the rtype to *any* of the linked VNs.
Diffstat (limited to 'lib')
-rw-r--r--lib/VNWeb/AdvSearch.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNWeb/AdvSearch.pm b/lib/VNWeb/AdvSearch.pm
index f322c433..39f8a014 100644
--- a/lib/VNWeb/AdvSearch.pm
+++ b/lib/VNWeb/AdvSearch.pm
@@ -382,7 +382,7 @@ f r => 12 => 'voiced', { uint => 1, enum => \%VOICED }, '=' => sub { sql 'NOT
f r => 13 => 'animation-ero', { uint => 1, enum => \%ANIMATED }, '=' => sub { sql 'NOT r.patch AND r.ani_ero =', \$_ };
f r => 14 => 'animation-story', { uint => 1, enum => \%ANIMATED }, '=' => sub { sql 'NOT r.patch AND r.ani_story =', \$_ };
f r => 15 => 'engine', { required => 0, default => '' }, '=' => sub { sql 'r.engine =', \$_ };
-f r => 16 => 'rtype', { enum => \%RELEASE_TYPE }, '=' => sub { sql 'r.id IN(SELECT id FROM releases_vn WHERE rtype =', \$_, ')' };
+f r => 16 => 'rtype', { enum => \%RELEASE_TYPE }, '=' => sub { $#TYPE && $TYPE[$#TYPE-1] eq 'v' ? sql 'rv.rtype =', \$_ : sql 'r.id IN(SELECT id FROM releases_vn WHERE rtype =', \$_, ')' };
f r => 18 => 'rlist', { uint => 1, enum => \%RLIST_STATUS }, sql_list => sub {
my($neg, $all, $val) = @_;
return '1=0' if !auth;