mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 06:24:08 +00:00
Merge "Show notice if user is globally blocked"
This commit is contained in:
commit
c034e31404
|
@ -368,6 +368,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