Merge "Make Special:ChangeContentModel field labels consistently use colons"
[lhc/web/wiklou.git] / includes / MovePage.php
index a63eeae..e6faace 100644 (file)
@@ -141,8 +141,9 @@ class MovePage {
                }
 
                $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',
@@ -351,7 +352,8 @@ class MovePage {
                }
 
                // Check suppressredirect permission
-               if ( !$user->isAllowed( 'suppressredirect' ) ) {
+               $permissionManager = MediaWikiServices::getInstance()->getPermissionManager();
+               if ( !$permissionManager->userHasRight( $user, 'suppressredirect' ) ) {
                        $createRedirect = true;
                }