Fix a typo in a query against shadow_files.
authorSteinar H. Gunderson <sesse@debian.org>
Sun, 12 Dec 2010 23:03:24 +0000 (00:03 +0100)
committerSteinar H. Gunderson <sesse@debian.org>
Sun, 12 Dec 2010 23:03:24 +0000 (00:03 +0100)
perl/Sesse/pr0n/WebDAV.pm

index 73ca79cca6652a2619c308148da1b2c59b491197..ebef01022e54788e7136dcf0961633edfa8b6ac0 100644 (file)
@@ -368,7 +368,7 @@ EOF
                } else {
                        # check if we have a "shadow file" for this
                        if (defined($autorename) && $autorename eq "autorename/") {
-                               my $ref = $dbh->selectrow_hashref('SELECT id FROM shadow_files WHERE host=? AND event=? AND filename=? AND expires_at > now()',
+                               my $ref = $dbh->selectrow_hashref('SELECT id FROM shadow_files WHERE vhost=? AND event=? AND filename=? AND expires_at > now()',
                                        undef, $r->get_server_name, $event, $filename);
                                if (defined($ref)) {
                                        ($fname, $size, $mtime) = Sesse::pr0n::Common::stat_image_from_id($r, $ref->{'id'});