Merge "Remove usage of User::isBlockedGlobally and User::getGlobalBlock"

This commit is contained in:
jenkins-bot 2022-11-16 15:22:09 +00:00 committed by Gerrit Code Review
commit a584e73975
2 changed files with 2 additions and 4 deletions

View file

@ -24,7 +24,7 @@
"license-name": "MIT",
"type": "editor",
"requires": {
"MediaWiki": ">= 1.39.0"
"MediaWiki": ">= 1.40.0"
},
"callback": "MediaWiki\\Extension\\VisualEditor\\Hooks::onRegistration",
"ServiceWiringFiles": [

View file

@ -581,9 +581,7 @@ class ApiVisualEditor extends ApiBase {
$block = null;
$blockinfo = null;
// Blocked user notice
if ( $user->isBlockedGlobally() ) {
$block = $user->getGlobalBlock();
} elseif ( $permissionManager->isBlockedFrom( $user, $title, true ) ) {
if ( $permissionManager->isBlockedFrom( $user, $title, true ) ) {
$block = $user->getBlock();
}
if ( $block ) {