mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 22:13:34 +00:00
Show notice if user is globally blocked
Bug: 53009 Change-Id: I5c8a31f40535e7495133738a03d83648d57fb526
This commit is contained in:
parent
6e02932c3a
commit
cb9022bfe3
|
@ -391,6 +391,19 @@ class ApiVisualEditor extends ApiBase {
|
|||
)->parseAsBlock();
|
||||
}
|
||||
|
||||
if ( class_exists( 'GlobalBlocking' ) ) {
|
||||
$error = GlobalBlocking::getUserBlockErrors(
|
||||
$user,
|
||||
$this->getRequest()->getIP()
|
||||
);
|
||||
if ( count( $error ) ) {
|
||||
$notices[] = call_user_func_array(
|
||||
array( $this, 'msg' ),
|
||||
$error
|
||||
)->parseAsBlock();
|
||||
}
|
||||
}
|
||||
|
||||
// HACK: Build a fake EditPage so we can get checkboxes from it
|
||||
$article = new Article( $page ); // Deliberately omitting ,0 so oldid comes from request
|
||||
$ep = new EditPage( $article );
|
||||
|
|
Loading…
Reference in a new issue