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

Bug: T318898
Change-Id: I727cda9008866b665395cd0e9969c920dc9c28d6
This commit is contained in:
csimiyu 2022-11-14 15:03:27 +03:00
parent 9d8772b07d
commit 4bdb4917f0
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

@ -577,9 +577,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 ) {