From 67dbf621b63e3fe7c59bd602331054245f3b04ac Mon Sep 17 00:00:00 2001 From: Ed Sanders Date: Wed, 24 Jul 2013 10:43:21 +0100 Subject: [PATCH] Show newarticletext(anon) when creating a new page Bug: 51459 Change-Id: Id8509c6c8b92a0355b97d7661affe749fcdfdcba --- ApiVisualEditor.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php index d509eaf53a..9a4e4ce91c 100644 --- a/ApiVisualEditor.php +++ b/ApiVisualEditor.php @@ -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 ) {