argument
* (bug 20136) Protection form JavaScript now synchronizes the expiry boxes on
any change, in addition to onkeyup.
+* Don't link to "edit this page" on MediaWiki:Noarticletext if user is not allowed
+ to create page. Done via new message MediaWiki:Noarticletext-nopermission
== API changes in 1.16 ==
// Use the default message text
$text = $this->getContent();
} else {
- $text = wfMsgNoTrans( 'noarticletext' );
+ if ( $this->mTitle->userCan( 'edit' ) )
+ $text = wfMsgNoTrans( 'noarticletext' );
+ else
+ $text = wfMsgNoTrans( 'noarticletext-nopermission' );
}
$text = "<div class='noarticletext'>\n$text\n</div>";
if( !$this->hasViewableContent() ) {
You can [[Special:Search/{{PAGENAME}}|search for this page title]] in other pages,
<span class="plainlinks">[{{fullurl:Special:Log|page={{urlencode:{{FULLPAGENAME}}}}}} search the related logs],
or [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page]</span>.',
+'noarticletext-nopermission' => 'There is currently no text in this page.
+You can [[Special:Search/{{PAGENAME}}|search for this page title]] in other pages,
+or <span class="plainlinks">[{{fullurl:Special:Log|page={{urlencode:{{FULLPAGENAME}}}}}} search the related logs]</span>.',
'noarticletextanon' => '{{int:noarticletext}}', # do not translate or duplicate this message to other languages
'userpage-userdoesnotexist' => 'User account "$1" is not registered.
Please check if you want to create/edit this page.',
'talkpagetext',
'anontalkpagetext',
'noarticletext',
+ 'noarticletext-nopermission',
'noarticletextanon',
'userpage-userdoesnotexist',
'clearyourcache',