diff options
author | Yorhel <git@yorhel.nl> | 2021-01-15 14:53:13 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2021-01-15 14:53:29 +0100 |
commit | e01e2f0adcea9a528e9d99bd86286f5e6dfc6c98 (patch) | |
tree | f33bbd596cb6d55d4bfe86d1da96b00c40721182 /lib/VNWeb | |
parent | 5d660e60ed2d1f9aa04f8e4424a7856fdd6529d7 (diff) |
AdvSearch: Add release list status filter
Unlike the label filters, this one doesn't (yet) include the user ID in
the URL. Can always be added later if necessary, but checking the
visibility of rlists rows is rather annoying.
Diffstat (limited to 'lib/VNWeb')
-rw-r--r-- | lib/VNWeb/AdvSearch.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/VNWeb/AdvSearch.pm b/lib/VNWeb/AdvSearch.pm index 485bb73a..0a0590a8 100644 --- a/lib/VNWeb/AdvSearch.pm +++ b/lib/VNWeb/AdvSearch.pm @@ -379,6 +379,11 @@ f r => 13 => 'animation-ero', { uint => 1, enum => \%ANIMATED }, '=' => sub { 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.type =', \$_ }; +f r => 18 => 'rlist', { uint => 1, enum => \%RLIST_STATUS }, sql_list => sub { + my($neg, $all, $val) = @_; + return '1=0' if !auth; + sql 'r.id', $neg ? 'NOT' : '', 'IN(SELECT rid FROM rlists WHERE uid =', \auth->uid, 'AND status IN', $val, $all && @$val > 1 ? ('GROUP BY rid HAVING COUNT(status) =', \scalar @$val) : (), ')'; + }; f r => 61 => 'patch', { uint => 1, range => [1,1] }, '=' => sub { 'r.patch' }; f r => 62 => 'freeware', { uint => 1, range => [1,1] }, '=' => sub { 'r.freeware' }; f r => 63 => 'doujin', { uint => 1, range => [1,1] }, '=' => sub { 'r.doujin' }; |