mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 22:13:34 +00:00
Merge "Remove usage of User::isBlockedGlobally and User::getGlobalBlock"
This commit is contained in:
commit
a584e73975
|
@ -24,7 +24,7 @@
|
||||||
"license-name": "MIT",
|
"license-name": "MIT",
|
||||||
"type": "editor",
|
"type": "editor",
|
||||||
"requires": {
|
"requires": {
|
||||||
"MediaWiki": ">= 1.39.0"
|
"MediaWiki": ">= 1.40.0"
|
||||||
},
|
},
|
||||||
"callback": "MediaWiki\\Extension\\VisualEditor\\Hooks::onRegistration",
|
"callback": "MediaWiki\\Extension\\VisualEditor\\Hooks::onRegistration",
|
||||||
"ServiceWiringFiles": [
|
"ServiceWiringFiles": [
|
||||||
|
|
|
@ -581,9 +581,7 @@ class ApiVisualEditor extends ApiBase {
|
||||||
$block = null;
|
$block = null;
|
||||||
$blockinfo = null;
|
$blockinfo = null;
|
||||||
// Blocked user notice
|
// Blocked user notice
|
||||||
if ( $user->isBlockedGlobally() ) {
|
if ( $permissionManager->isBlockedFrom( $user, $title, true ) ) {
|
||||||
$block = $user->getGlobalBlock();
|
|
||||||
} elseif ( $permissionManager->isBlockedFrom( $user, $title, true ) ) {
|
|
||||||
$block = $user->getBlock();
|
$block = $user->getBlock();
|
||||||
}
|
}
|
||||||
if ( $block ) {
|
if ( $block ) {
|
||||||
|
|
Loading…
Reference in a new issue