*/
use MediaWiki\MediaWikiServices;
+use MediaWiki\Storage\RevisionRecord;
/**
* Helper class for file deletion
$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();
}
// Bitfields to further suppress the content
if ( $this->suppress ) {
- $bitfield = Revision::SUPPRESSED_ALL;
+ $bitfield = RevisionRecord::SUPPRESSED_ALL;
} else {
$bitfield = 'oi_deleted';
}