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 ) {