Fix return type of UploadStashFile::remove()
[lhc/web/wiklou.git] / includes / upload / UploadStash.php
index aa31a5b..bc7b42b 100644 (file)
@@ -162,12 +162,10 @@ class UploadStash {
                        );
                }
 
-               if ( !$noAuth ) {
-                       if ( $this->fileMetadata[$key]['us_user'] != $this->userId ) {
-                               throw new UploadStashWrongOwnerException(
-                                       wfMessage( 'uploadstash-wrong-owner', $key )
-                               );
-                       }
+               if ( !$noAuth && $this->fileMetadata[$key]['us_user'] != $this->userId ) {
+                       throw new UploadStashWrongOwnerException(
+                               wfMessage( 'uploadstash-wrong-owner', $key )
+                       );
                }
 
                return $this->files[$key];
@@ -751,7 +749,7 @@ class UploadStashFile extends UnregisteredLocalFile {
 
        /**
         * Remove the associated temporary file
-        * @return status Success
+        * @return bool Success
         */
        public function remove() {
                if ( !$this->repo->fileExists( $this->path ) ) {