Esanders has uploaded a new change for review. https://gerrit.wikimedia.org/r/75563
Change subject: Show newarticletext(anon) when creating a new page ...................................................................... Show newarticletext(anon) when creating a new page Bug: 51459 Change-Id: Id8509c6c8b92a0355b97d7661affe749fcdfdcba --- M ApiVisualEditor.php 1 file changed, 7 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/63/75563/1 diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php index d509eaf..9a4e4ce 100644 --- a/ApiVisualEditor.php +++ b/ApiVisualEditor.php @@ -235,9 +235,13 @@ $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 ) { -- To view, visit https://gerrit.wikimedia.org/r/75563 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id8509c6c8b92a0355b97d7661affe749fcdfdcba Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Esanders <esand...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits