}
$tp = $this->newTitle->getTitleProtection();
- if ( $tp !== false && !$user->isAllowed( $tp['permission'] ) ) {
- $status->fatal( 'cantmove-titleprotected' );
+ $permissionManager = MediaWikiServices::getInstance()->getPermissionManager();
+ if ( $tp !== false && !$permissionManager->userHasRight( $user, $tp['permission'] ) ) {
+ $status->fatal( 'cantmove-titleprotected' );
}
Hooks::run( 'MovePageCheckPermissions',
}
// Check suppressredirect permission
- if ( !$user->isAllowed( 'suppressredirect' ) ) {
+ $permissionManager = MediaWikiServices::getInstance()->getPermissionManager();
+ if ( !$permissionManager->userHasRight( $user, 'suppressredirect' ) ) {
$createRedirect = true;
}
$status = Status::newFatal( 'movepage-max-pages', $wgMaximumMovedPages );
$perTitleStatus[$oldSubpage->getPrefixedText()] = $status;
$topStatus->merge( $status );
- $topStatus->setOk( true );
+ $topStatus->setOK( true );
break;
}
}
$perTitleStatus[$oldSubpage->getPrefixedText()] = $status;
$topStatus->merge( $status );
- $topStatus->setOk( true );
+ $topStatus->setOK( true );
}
$topStatus->value = $perTitleStatus;
'4::oldtitle' => $this->oldTitle->getPrefixedText(),
] );
$logEntry->setRelations( [ 'pr_id' => $logRelationsValues ] );
- $logEntry->setTags( $changeTags );
+ $logEntry->addTags( $changeTags );
$logId = $logEntry->insert();
$logEntry->publish( $logId );
}
# Log the move
$logid = $logEntry->insert();
- $logEntry->setTags( $changeTags );
+ $logEntry->addTags( $changeTags );
$logEntry->publish( $logid );
return $nullRevision;