X-Git-Url: http://git.cyclocoop.org//%27http:/jquery.khurshid.com/ifixpng.php/%27?a=blobdiff_plain;f=includes%2FMergeHistory.php;h=4045a5436b56127550ec76709fe8dc9207e3ffa4;hb=c1ec8b95ab218e0b62d5e7a71855dff241b53f15;hp=0914a9b7d8deb2f24bf413ce1a8a552bf18cb2dd;hpb=a1edf3cf93ad15e9f89abee018c95bb0242d892a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/MergeHistory.php b/includes/MergeHistory.php index 0914a9b7d8..4045a5436b 100644 --- a/includes/MergeHistory.php +++ b/includes/MergeHistory.php @@ -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' ); }