mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Merge "Show blockedtext message in edit notices"
This commit is contained in:
commit
b55d28bd24
|
@ -389,6 +389,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
|
||||
$article = new Article( $page ); // Deliberately omitting ,0 so oldid comes from request
|
||||
$ep = new EditPage( $article );
|
||||
|
|
Loading…
Reference in a new issue