* @param array $fileVersions
* @param bool $unsuppress
* @param User $user User performing the action, or null to use $wgUser
+ * @param string|string[] $tags Change tags to add to log entry
+ * ($user should be able to add the specified tags before this is called)
* @return array(number of file revisions restored, number of image revisions
* restored, log message) on success, false on failure.
*/
function undelete( $timestamps, $comment = '', $fileVersions = [],
- $unsuppress = false, User $user = null
+ $unsuppress = false, User $user = null, $tags = null
) {
// If both the set of text revisions and file revisions are empty,
// restore everything. Otherwise, just restore the requested items.
$logEntry->setPerformer( $user );
$logEntry->setTarget( $this->title );
$logEntry->setComment( $reason );
+ $logEntry->setTags( $tags );
Hooks::run( 'ArticleUndeleteLogEntry', [ $this, &$logEntry, $user ] );
parent::__construct( 'Undelete', 'deletedhistory' );
}
+ public function doesWrites() {
+ return true;
+ }
+
function loadRequest( $par ) {
$request = $this->getRequest();
$user = $this->getUser();
"ids" => $revisions,
"target" => $this->mTargetObj->getPrefixedText()
];
- $url = SpecialPage::getTitleFor( "RevisionDelete" )->getFullURL( $query );
+ $url = SpecialPage::getTitleFor( 'Revisiondelete' )->getFullURL( $query );
$this->getOutput()->redirect( $url );
}