]> git.sesse.net Git - pr0n/blobdiff - perl/Sesse/pr0n/Index.pm
Add a (hidden) feature for filtering authors down to a set, not just one.
[pr0n] / 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) {