Update RELEASE-NOTES
[lhc/web/wiklou.git] / includes / upload / UploadStash.php
index 2c4bc11..215bd20 100644 (file)
@@ -89,12 +89,8 @@ class UploadStash {
 
                // if a user was passed, use it. otherwise, attempt to use the global.
                // this keeps FileRepo from breaking when it creates an UploadStash object
-               if ( $user ) {
-                       $this->user = $user;
-               } else {
-                       global $wgUser;
-                       $this->user = $wgUser;
-               }
+               global $wgUser;
+               $this->user = $user ?: $wgUser;
 
                if ( is_object( $this->user ) ) {
                        $this->userId = $this->user->getId();
@@ -437,7 +433,7 @@ class UploadStash {
         * List all files in the stash.
         *
         * @throws UploadStashNotLoggedInException
-        * @return array
+        * @return array|false
         */
        public function listFiles() {
                if ( !$this->isLoggedIn ) {