DeletePageJob: add fallback for page role
Might cause issues with queued jobs, possibly something else, as per comments at I32679b7cacc638ec3e9dc5b8dfe9bcc794b22ecf. Change-Id: I851aeb9af068d31a48f8f6a3ba98751374e88b6e
This commit is contained in:
parent
efce4c6a76
commit
57bf1f67bc
1 changed files with 6 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
use MediaWiki\MediaWikiServices;
|
||||
use MediaWiki\Page\DeletePage;
|
||||
|
||||
/**
|
||||
* Class DeletePageJob
|
||||
|
|
@ -27,7 +28,11 @@ class DeletePageJob extends Job implements GenericParameterJob {
|
|||
->setTags( json_decode( $this->params['tags'] ) )
|
||||
->setLogSubtype( $this->params['logsubtype'] )
|
||||
->deleteInternal(
|
||||
$this->params['pageRole'], $this->params['reason'], $this->getRequestId() );
|
||||
// Use a fallback for BC with queued jobs.
|
||||
$this->params['pageRole'] ?? DeletePage::PAGE_BASE,
|
||||
$this->params['reason'],
|
||||
$this->getRequestId()
|
||||
);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue