Show newarticletext(anon) when creating a new page

Bug: 51459
Change-Id: Id8509c6c8b92a0355b97d7661affe749fcdfdcba
This commit is contained in:
Ed Sanders 2013-07-24 10:43:21 +01:00
parent 393807462e
commit 67dbf621b6

View file

@ -235,9 +235,13 @@ class ApiVisualEditor extends ApiBase {
$wgVisualEditorEditNotices[] = 'protectedpagewarning';
}
}
// Page protected from creation
if ( !$page->exists() && $page->getRestrictions( 'create' ) ) {
$wgVisualEditorEditNotices[] = 'titleprotectedwarning';
// Creating new page
if ( !$page->exists() ) {
$wgVisualEditorEditNotices[] = $user->isLoggedIn() ? 'newarticletext' : 'newarticletextanon';
// Page protected from creation
if ( $page->getRestrictions( 'create' ) ) {
$wgVisualEditorEditNotices[] = 'titleprotectedwarning';
}
}
if ( count( $wgVisualEditorEditNotices ) ) {
foreach ( $wgVisualEditorEditNotices as $key ) {