mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-24 10:48:42 +00:00
Show blockedtext message in edit notices
Depends on If5b7ef401 in oojs-ui Bug: 52004 Change-Id: Icf672dfec4f57bef3e485428d07759ab51470999
This commit is contained in:
parent
7821eb7bd3
commit
aec9279d84
|
@ -354,6 +354,13 @@ class ApiVisualEditor extends ApiBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( $user->isBlockedFrom( $page ) && $user->getBlock()->prevents( 'edit' ) !== false ) {
|
||||||
|
$notices[] = call_user_func_array(
|
||||||
|
array( $this, 'msg' ),
|
||||||
|
$user->getBlock()->getPermissionsError( $this->getContext() )
|
||||||
|
)->parseAsBlock();
|
||||||
|
}
|
||||||
|
|
||||||
// HACK: Build a fake EditPage so we can get checkboxes from it
|
// HACK: Build a fake EditPage so we can get checkboxes from it
|
||||||
$article = new Article( $page ); // Deliberately omitting ,0 so oldid comes from request
|
$article = new Article( $page ); // Deliberately omitting ,0 so oldid comes from request
|
||||||
$ep = new EditPage( $article );
|
$ep = new EditPage( $article );
|
||||||
|
|
Loading…
Reference in a new issue