X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fupload%2FUploadStash.php;h=d39975db1b9c813486f555d9eafd37ec9324411f;hb=616525021b3691e30a980a42b837b7ad44ecfd09;hp=2c4bc11b71ee27473155022c7305c965a7890419;hpb=27a6845c2a675990b04dfead674c0d46d140aa17;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/upload/UploadStash.php b/includes/upload/UploadStash.php index 2c4bc11b71..d39975db1b 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();