mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 06:24:08 +00:00
Show newarticletext(anon) when creating a new page
Bug: 51459 Change-Id: Id8509c6c8b92a0355b97d7661affe749fcdfdcba
This commit is contained in:
parent
393807462e
commit
67dbf621b6
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in a new issue