From: Steinar H. Gunderson Date: Sun, 30 Jul 2006 13:54:37 +0000 (+0200) Subject: Add a new row to last_picture_cache when we create a new event. X-Git-Url: https://git.sesse.net/?p=pr0n;a=commitdiff_plain;h=bbc0c1c88b7d8365df677eef51093b7b331f4666 Add a new row to last_picture_cache when we create a new event. --- diff --git a/perl/Sesse/pr0n/NewEvent.pm b/perl/Sesse/pr0n/NewEvent.pm index 3eaa5dd..18faf6a 100644 --- a/perl/Sesse/pr0n/NewEvent.pm +++ b/perl/Sesse/pr0n/NewEvent.pm @@ -42,6 +42,9 @@ sub handler { $dbh->do("INSERT INTO events (id,date,name,vhost) VALUES (?,?,?,?)", undef, $id, $date, $desc, $r->get_server_name) or dberror($r, "Kunne ikke sette inn ny hendelse"); + $dbh->do("INSERT INTO last_picture_cache (event,last_picture) VALUES (?,NULL)", + undef, $id) + or dberror($r, "Kunne ikke sette inn ny cache-rad"); $r->print("

Hendelsen '$id' lagt til.

"); }