X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=perl%2FSesse%2Fpr0n%2FIndex.pm;h=3597deeaff849d37d19cacffd3da4d9a4ce9eb08;hb=6951b59b735a70aec51ceeab7a188d6f6cf75a9f;hp=ec28b7288cd914b685439adedf2c878b4cf8884b;hpb=167f5a678e37c8e3d55fcded24419848dfe7d83e;p=pr0n diff --git a/perl/Sesse/pr0n/Index.pm b/perl/Sesse/pr0n/Index.pm index ec28b72..3597dee 100644 --- a/perl/Sesse/pr0n/Index.pm +++ b/perl/Sesse/pr0n/Index.pm @@ -150,14 +150,14 @@ sub handler { my ($date, $name); if ($event eq '+all' || defined($tag)) { - $ref = $dbh->selectrow_hashref("SELECT EXTRACT(EPOCH FROM MAX(last_update)) AS last_update FROM events WHERE vhost=?", + $ref = $dbh->selectrow_hashref("SELECT EXTRACT(EPOCH FROM MAX(last_update)) AS last_update FROM last_picture_cache WHERE vhost=?", undef, $r->get_server_name) or error($r, "Could not list events", 404, "File not found"); $date = undef; $name = Sesse::pr0n::Templates::fetch_template($r, 'all-event-title'); $r->set_last_modified($ref->{'last_update'}); } else { - $ref = $dbh->selectrow_hashref("SELECT name,date,EXTRACT(EPOCH FROM last_update) AS last_update FROM events WHERE vhost=? AND event=?", + $ref = $dbh->selectrow_hashref("SELECT name,date,EXTRACT(EPOCH FROM last_update) AS last_update FROM events NATURAL JOIN last_picture_cache WHERE vhost=? AND event=?", undef, $r->get_server_name, $event) or error($r, "Could not find event $event", 404, "File not found"); @@ -476,7 +476,7 @@ sub print_thumbsize { } sub print_viewres { my ($r, $event, $settings, $defsettings) = @_; - my @alternatives = qw(320x256 512x384 640x480 800x600 1024x768 1280x960 1400x1050 1600x1200); + my @alternatives = qw(320x256 512x384 640x480 800x600 1024x768 1152x864 1280x960 1400x1050 1600x1200 1920x1440 2048x1536); chomp (my $unlimited = Sesse::pr0n::Templates::fetch_template($r, 'viewres-unlimited')); chomp (my $original = Sesse::pr0n::Templates::fetch_template($r, 'viewres-original')); push @alternatives, [ $unlimited, undef, undef ];