Merge "Clear the stat cache in addMissingMetadata() to avoid more POSTs"
[lhc/web/wiklou.git] / includes / filebackend / SwiftFileBackend.php
index 1aab033..3db235b 100644 (file)
@@ -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
                }
 
@@ -702,7 +702,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
        }