X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Ffilerepo%2Ffile%2FLocalFileDeleteBatch.php;h=d4479459519858485bacd4a03632c8d4cdf10ce3;hp=ecd63e75dd1770e5a3bdbaf769d72fbac3d773d1;hb=04d1aa3033f40a38d721f7f0e88b5bac440d2869;hpb=1ce6c003b882301ba978d24a596759bde6d91d20 diff --git a/includes/filerepo/file/LocalFileDeleteBatch.php b/includes/filerepo/file/LocalFileDeleteBatch.php index ecd63e75dd..d447945951 100644 --- a/includes/filerepo/file/LocalFileDeleteBatch.php +++ b/includes/filerepo/file/LocalFileDeleteBatch.php @@ -62,12 +62,8 @@ class LocalFileDeleteBatch { $this->file = $file; $this->reason = $reason; $this->suppress = $suppress; - if ( $user ) { - $this->user = $user; - } else { - global $wgUser; - $this->user = $wgUser; - } + global $wgUser; + $this->user = $user ?: $wgUser; $this->status = $file->repo->newGood(); }