- if ($event eq 'single' && $filename =~ /^(\d+)\.jpeg$/) {
- $id = $1;
- } else {
- # Alas, we obviously need to do this :-)
- # my $evq = $dbh->prepare('SELECT count(*) AS numev FROM events WHERE id=? AND vhost=?')
- # or die "prepare(): $!";
- # my $ref = $dbh->selectrow_hashref($evq, undef, $event, $r->get_server_name)
- # or dberror($r, "Could not look up $event");
- # $ref->{'numev'} == 1
- # or error($r, "Could not find $event", 404, "File not found");