X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fupload%2FUploadStash.php;h=215bd2041f16b860d94a549551ab2e93af7b2ddf;hb=18b3c566fcdf61dad674c0010ce3beb4309d7a04;hp=2c4bc11b71ee27473155022c7305c965a7890419;hpb=3f1474de5d9d3980acd895c9accfe361f8a6dbaf;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/upload/UploadStash.php b/includes/upload/UploadStash.php index 2c4bc11b71..215bd2041f 100644 --- a/includes/upload/UploadStash.php +++ b/includes/upload/UploadStash.php @@ -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 ) {