From: Aaron Schulz Date: Wed, 22 Jul 2015 20:19:12 +0000 (-0700) Subject: Improved addMissingMetadata() on POST failure X-Git-Tag: 1.31.0-rc.0~10613^2 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=6e7c034901586680b52c21f0cdb1e9988b4716c5;p=lhc%2Fweb%2Fwiklou.git Improved addMissingMetadata() on POST failure * If the POST failed but the sha1 was computed, then use and cache that value rather than "false". Change-Id: I42b53c823013ecd9b281406e3d533a21e0de7cfb --- diff --git a/includes/filebackend/SwiftFileBackend.php b/includes/filebackend/SwiftFileBackend.php index 2ccafe4b1d..e9df2054f9 100644 --- a/includes/filebackend/SwiftFileBackend.php +++ b/includes/filebackend/SwiftFileBackend.php @@ -670,10 +670,10 @@ class SwiftFileBackend extends FileBackendStore { $ps = Profiler::instance()->scopedProfileIn( __METHOD__ . "-{$this->name}" ); wfDebugLog( 'SwiftBackend', __METHOD__ . ": $path was not stored with SHA-1 metadata." ); + $objHdrs['x-object-meta-sha1base36'] = false; + $auth = $this->getAuthentication(); if ( !$auth ) { - $objHdrs['x-object-meta-sha1base36'] = false; - return $objHdrs; // failed } @@ -700,7 +700,6 @@ class SwiftFileBackend extends FileBackendStore { } wfDebugLog( 'SwiftBackend', __METHOD__ . ": unable to set SHA-1 metadata for $path" ); - $objHdrs['x-object-meta-sha1base36'] = false; return $objHdrs; // failed }