]> git.sesse.net Git - pr0n/blobdiff - perl/Sesse/pr0n/Listing.pm
Fix another deadlock-when-many-people-upload bug, like the one we fixed in r14
[pr0n] / perl / Sesse / pr0n / Listing.pm
index 03285a142f969265cf2ae340ed8b7fe68fc1b536..a0069455b9107b6582466555c4bd0f74a00edd53 100644 (file)
@@ -24,7 +24,7 @@ sub handler {
        }
        
        # find the last modification
-       my $ref = $dbh->selectrow_hashref('SELECT EXTRACT(EPOCH FROM last_update) AS last_update FROM events WHERE vhost=? ORDER BY last_update DESC LIMIT 1',
+       my $ref = $dbh->selectrow_hashref('SELECT EXTRACT(EPOCH FROM last_update) AS last_update FROM last_picture_cache WHERE vhost=? ORDER BY last_update DESC LIMIT 1',
                undef, $r->get_server_name)
                or error($r, "Could not any events", 404, "File not found");
        $r->set_last_modified($ref->{'last_update'});