jenkins-bot has submitted this change and it was merged.

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

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



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: merged
Gerrit-Change-Id: Id8509c6c8b92a0355b97d7661affe749fcdfdcba
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to