X-Git-Url: https://git.sesse.net/?p=pr0n;a=blobdiff_plain;f=perl%2FSesse%2Fpr0n%2FWebDAV.pm;h=21573c64def4ebb9700d20b27b87f5212361dbae;hp=73ca79cca6652a2619c308148da1b2c59b491197;hb=acc5b53241d0e971595d6017c60f54a6bc057c41;hpb=9b45ad1ecd9f1eace384f825a7dc6b2b7920af65 diff --git a/perl/Sesse/pr0n/WebDAV.pm b/perl/Sesse/pr0n/WebDAV.pm index 73ca79c..21573c6 100644 --- a/perl/Sesse/pr0n/WebDAV.pm +++ b/perl/Sesse/pr0n/WebDAV.pm @@ -3,7 +3,7 @@ use strict; use warnings; use Sesse::pr0n::Common qw(error dberror); -use Digest::SHA1; +use Digest::SHA; use MIME::Base64; use Apache2::Request; use Apache2::Upload; @@ -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'}); @@ -500,7 +500,7 @@ EOF if ($filename !~ /^\.(_|DS_Store)/) { # FIXME: Ideally we'd want to ensure cache of -1x-1 here as well (for NEFs), but that would # preclude mipmapping in its current form. - Sesse::pr0n::Common::ensure_cached($r, $filename, $newid, undef, undef, "nobox", 80, 64, 320, 256); + Sesse::pr0n::Common::ensure_cached($r, $filename, $newid, undef, undef, "nobox", 1, 80, 64, 320, 256); } # OK, we got this far, commit @@ -629,7 +629,7 @@ EOF or die "/usr/bin/exifautotran: $!"; # Make cache while we're at it. - Sesse::pr0n::Common::ensure_cached($r, $filename, $newid, undef, undef, 1, 80, 64, 320, 256, -1, -1); + Sesse::pr0n::Common::ensure_cached($r, $filename, $newid, undef, undef, 1, 1, 80, 64, 320, 256, -1, -1); # OK, we got this far, commit $dbh->commit; @@ -666,7 +666,7 @@ EOF my ($event, $autorename, $filename) = ($1, $2, $3); $autorename = '' if (!defined($autorename)); - my $sha1 = Digest::SHA1::sha1_base64("/$event/$autorename$filename"); + my $sha1 = Digest::SHA::sha1_base64("/$event/$autorename$filename"); $r->status(200); $r->content_type('text/xml; charset=utf-8');