From: Steinar H. Gunderson Date: Tue, 22 Mar 2016 17:32:05 +0000 (+0100) Subject: Add a (hidden) feature for filtering authors down to a set, not just one. X-Git-Url: https://git.sesse.net/?p=pr0n;a=commitdiff_plain;h=400a1bbb95bf6837807e2819825cddd00c219cf1 Add a (hidden) feature for filtering authors down to a set, not just one. --- diff --git a/perl/Sesse/pr0n/Index.pm b/perl/Sesse/pr0n/Index.pm index 7d2ddf8..cb83a92 100644 --- a/perl/Sesse/pr0n/Index.pm +++ b/perl/Sesse/pr0n/Index.pm @@ -122,9 +122,8 @@ sub handler { } } if (defined($author)) { - my $aq = $dbh->quote($author); - - $where .= " AND takenby=$aq"; + my @authors = split /,/, $author; + $where .= " AND takenby IN (" . join(', ', map { $dbh->quote($_) } @authors) . ")"; } if (defined($num) && $num == -1) {