Merge "Exclude redirects from Special:Fewestrevisions"
[lhc/web/wiklou.git] / includes / filerepo / file / LocalFileDeleteBatch.php
index ecd63e7..61faa09 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 use MediaWiki\MediaWikiServices;
+use MediaWiki\Storage\RevisionRecord;
 
 /**
  * Helper class for file deletion
@@ -62,12 +63,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();
        }
 
@@ -199,7 +196,7 @@ class LocalFileDeleteBatch {
 
                // Bitfields to further suppress the content
                if ( $this->suppress ) {
-                       $bitfield = Revision::SUPPRESSED_ALL;
+                       $bitfield = RevisionRecord::SUPPRESSED_ALL;
                } else {
                        $bitfield = 'oi_deleted';
                }