Follow-up 7960d53: Mark when the SecondaryDataUpdates and WikiPageDeletionUpdates...
[lhc/web/wiklou.git] / includes / MergeHistory.php
index 0914a9b..4045a54 100644 (file)
@@ -32,7 +32,7 @@ use Wikimedia\Rdbms\IDatabase;
  */
 class MergeHistory {
 
-       /** @const int Maximum number of revisions that can be merged at once */
+       /** Maximum number of revisions that can be merged at once */
        const REVISION_LIMIT = 5000;
 
        /** @var Title Page from which history will be merged */
@@ -178,7 +178,8 @@ class MergeHistory {
                }
 
                // Check mergehistory permission
-               if ( !$user->isAllowed( 'mergehistory' ) ) {
+               $permissionManager = MediaWikiServices::getInstance()->getPermissionManager();
+               if ( !$permissionManager->userHasRight( $user, 'mergehistory' ) ) {
                        // User doesn't have the right to merge histories
                        $status->fatal( 'mergehistory-fail-permission' );
                }