X-Git-Url: https://git.sesse.net/?p=pr0n;a=blobdiff_plain;f=perl%2FSesse%2Fpr0n%2FCommon.pm;h=1472b7991915c286ae34e894e4c58e43c6005ae1;hp=d03f46f1f01a01a10b656bb0efeb53aeb1adfb6e;hb=f5c2a91d469df8a49364be887bf0a7a0e4b50c2f;hpb=d1b49fa6c2fd1b3d449dc938f0731c0426636c02 diff --git a/perl/Sesse/pr0n/Common.pm b/perl/Sesse/pr0n/Common.pm index d03f46f..1472b79 100644 --- a/perl/Sesse/pr0n/Common.pm +++ b/perl/Sesse/pr0n/Common.pm @@ -192,7 +192,7 @@ sub update_width_height { # update the last_picture cache as well (this should of course be done # via a trigger, but this is less complicated :-) ) - $dbh->do('UPDATE last_picture_cache SET last_picture=GREATEST(last_picture, ?) FROM images WHERE event=events.id) WHERE id=(SELECT event FROM images WHERE id=?)', + $dbh->do('UPDATE last_picture_cache SET last_picture=GREATEST(last_picture, ?) WHERE event=(SELECT event FROM images WHERE id=?)', undef, $datetime, $id) or die "Couldn't update last_picture in SQL: $!"; } @@ -438,9 +438,11 @@ sub make_infobox { } if (defined($info->{'Flash'})) { - if ($info->{'Flash'} =~ /did not fire/ || $info->{'Flash'} =~ /No Flash/) { + if ($info->{'Flash'} =~ /did not fire/i || + $info->{'Flash'} =~ /no flash/i || + $info->{'Flash'} =~ /not fired/i) { push @lines, "No flash"; - } elsif ($info->{'Flash'} =~ /fired/) { + } elsif ($info->{'Flash'} =~ /fired/i) { push @lines, "Flash"; } else { push @lines, $info->{'Flash'};