Add a new row to last_picture_cache when we create a new event.
authorSteinar H. Gunderson <sesse@debian.org>
Sun, 30 Jul 2006 13:54:37 +0000 (15:54 +0200)
committerSteinar H. Gunderson <sesse@debian.org>
Sun, 30 Jul 2006 13:54:37 +0000 (15:54 +0200)
perl/Sesse/pr0n/NewEvent.pm

index 3eaa5ddbb5c0a34fd23af2651b94f5a39f3f420d..18faf6a7bef44c5f34e17d01042cab94ff825652 100644 (file)
@@ -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("    <p>Hendelsen '$id' lagt til.</p>");
        }