]> git.sesse.net Git - pr0n/commitdiff
Don't LIMIT/OFFSET if we're in fullscreen mode; we're only showing one at
authorSteinar H. Gunderson <sesse@debian.org>
Mon, 31 Jul 2006 17:32:38 +0000 (19:32 +0200)
committerSteinar H. Gunderson <sesse@debian.org>
Mon, 31 Jul 2006 17:32:38 +0000 (19:32 +0200)
a time anyhow, and it confuses all the other logic.

perl/Sesse/pr0n/Index.pm

index c0c89a7f5d94d7cb6bd3c23d76845c232fb2d26a..44a57f8f329d3593b257c03d3b8f8a7af2f01aa9 100644 (file)
@@ -92,7 +92,7 @@ sub handler {
        my $q;
        my $where = ($all == 0) ? ' AND selected=\'t\'' : '';
 
-       if (defined($start) && defined($num)) {
+       if (defined($start) && defined($num) && !$settings{'fullscreen'}) {
                $q = $dbh->prepare("SELECT *, (date - INTERVAL '6 hours')::date AS day FROM images WHERE event=? $where ORDER BY (date - INTERVAL '6 hours')::date,takenby,date,filename LIMIT $num OFFSET " . ($start-1))
                        or dberror($r, "prepare()");
        } else {