]> git.sesse.net Git - pr0n/commitdiff
Add a (hidden) feature for filtering authors down to a set, not just one.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 22 Mar 2016 17:32:05 +0000 (18:32 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 22 Mar 2016 17:32:05 +0000 (18:32 +0100)
perl/Sesse/pr0n/Index.pm

index 7d2ddf8227703ae74a51a066557c06b81f5bf55e..cb83a9252933dcb9c19dae44de0b13666c835b7b 100644 (file)
@@ -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) {