Merge "Show blockedtext message in edit notices"

This commit is contained in:
jenkins-bot 2014-03-26 23:02:24 +00:00 committed by Gerrit Code Review
commit b55d28bd24

View file

@ -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 );