X-Git-Url: https://git.sesse.net/?p=pr0n;a=blobdiff_plain;f=perl%2FSesse%2Fpr0n%2FRotate.pm;h=be562255da39bb134ac488c9b7c1d2894d3a7290;hp=c3769f532730cd43c3b037a705307e71d159b4eb;hb=3bde4ccddbb9473fff56752d7100332d48affa1a;hpb=44c1611c549b7987e2394988e6bc66b1ad72d203 diff --git a/perl/Sesse/pr0n/Rotate.pm b/perl/Sesse/pr0n/Rotate.pm index c3769f5..be56225 100644 --- a/perl/Sesse/pr0n/Rotate.pm +++ b/perl/Sesse/pr0n/Rotate.pm @@ -37,7 +37,7 @@ sub handler { if ($rotval == 90 || $rotval == 270) { my $q = $dbh->do('UPDATE images SET height=width,width=height WHERE id=?', undef, $id) or dberror($r, "Size clear of $id failed"); - $dbh->do('UPDATE events SET last_update=CURRENT_TIMESTAMP WHERE (vhost,event)=( SELECT vhost,event FROM images WHERE id=? )', + $dbh->do('UPDATE last_picture_cache SET last_update=CURRENT_TIMESTAMP WHERE (vhost,event)=( SELECT vhost,event FROM images WHERE id=? )', undef, $id) or dberror($r, "Cache invalidation at $id failed"); } @@ -46,7 +46,7 @@ sub handler { { eval { - $dbh->do('UPDATE events SET last_update=CURRENT_TIMESTAMP WHERE (vhost,event)=( SELECT vhost,event FROM images WHERE id=? )', + $dbh->do('UPDATE last_picture_cache SET last_update=CURRENT_TIMESTAMP WHERE (vhost,event)=( SELECT vhost,event FROM images WHERE id=? )', undef, $id); $dbh->do('INSERT INTO deleted_images SELECT * FROM images WHERE id=?', undef, $id); @@ -67,7 +67,7 @@ sub handler { } my $event = $apr->param('event'); - $dbh->do('UPDATE events SET last_update=CURRENT_TIMESTAMP WHERE vhost=? AND event=?', undef, $r->get_server_name, $event) + $dbh->do('UPDATE last_picture_cache SET last_update=CURRENT_TIMESTAMP WHERE vhost=? AND event=?', undef, $r->get_server_name, $event) or dberror($r, "Cache invalidation failed"); Sesse::pr0n::Common::footer($r);