UploadStash::removeFileNoAuth shouldn't need auth
authorBrad Jorsch <bjorsch@wikimedia.org>
Tue, 29 Oct 2013 15:56:35 +0000 (11:56 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Tue, 29 Oct 2013 15:58:17 +0000 (11:58 -0400)
UploadStash::getFile has a "noAuth" parameter, which should be set true
when this is called from UploadStash::removeFileNoAuth.

Callers should already be doing their own auth checking, or calling
UploadStash::removeFile.

Bug: 56298
Change-Id: Ic70c4e2bc6df5cb9b139a3631766f8ff0ec4ef02

includes/upload/UploadStash.php

index ebeb9c1..7db6c64 100644 (file)
@@ -358,7 +358,7 @@ class UploadStash {
                wfDebug( __METHOD__ . " clearing row $key\n" );
 
                // Ensure we have the UploadStashFile loaded for this key
-               $this->getFile( $key );
+               $this->getFile( $key, true );
 
                $dbw = $this->repo->getMasterDb();