Merge "Give a notice if the user isn't allowed to create the page"

This commit is contained in:
jenkins-bot 2014-07-23 00:12:04 +00:00 committed by Gerrit Code Review
commit f220453495

View file

@ -371,6 +371,12 @@ class ApiVisualEditor extends ApiBase {
}
}
if ( !$page->userCan( 'create' ) && !$page->exists() ) {
$notices[] = $this->msg(
'permissionserrorstext-withaction', 1, $this->msg( 'action-createpage' )
) . "<br>" . $this->msg( 'nocreatetext' )->parse();
}
// Show notice when editing user / user talk page of a user that doesn't exist
// or who is blocked
// HACK of course this code is partly duplicated from EditPage.php :(