Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -537,6 +537,7 @@ |
538 | 538 | 'talkpagetext', |
539 | 539 | 'anontalkpagetext', |
540 | 540 | 'noarticletext', |
| 541 | + 'noarticletext-nopermission', |
541 | 542 | 'noarticletextanon', |
542 | 543 | 'userpage-userdoesnotexist', |
543 | 544 | 'clearyourcache', |
Index: trunk/phase3/includes/Article.php |
— | — | @@ -1213,7 +1213,10 @@ |
1214 | 1214 | // Use the default message text |
1215 | 1215 | $text = $this->getContent(); |
1216 | 1216 | } else { |
1217 | | - $text = wfMsgNoTrans( 'noarticletext' ); |
| 1217 | + if ( $this->mTitle->userCan( 'edit' ) ) |
| 1218 | + $text = wfMsgNoTrans( 'noarticletext' ); |
| 1219 | + else |
| 1220 | + $text = wfMsgNoTrans( 'noarticletext-nopermission' ); |
1218 | 1221 | } |
1219 | 1222 | $text = "<div class='noarticletext'>\n$text\n</div>"; |
1220 | 1223 | if( !$this->hasViewableContent() ) { |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1247,6 +1247,9 @@ |
1248 | 1248 | You can [[Special:Search/{{PAGENAME}}|search for this page title]] in other pages, |
1249 | 1249 | <span class="plainlinks">[{{fullurl:Special:Log|page={{urlencode:{{FULLPAGENAME}}}}}} search the related logs], |
1250 | 1250 | or [{{fullurl:{{FULLPAGENAME}}|action=edit}} edit this page]</span>.', |
| 1251 | +'noarticletext-nopermission' => 'There is currently no text in this page. |
| 1252 | +You can [[Special:Search/{{PAGENAME}}|search for this page title]] in other pages, |
| 1253 | +or <span class="plainlinks">[{{fullurl:Special:Log|page={{urlencode:{{FULLPAGENAME}}}}}} search the related logs]</span>.', |
1251 | 1254 | 'noarticletextanon' => '{{int:noarticletext}}', # do not translate or duplicate this message to other languages |
1252 | 1255 | 'userpage-userdoesnotexist' => 'User account "$1" is not registered. |
1253 | 1256 | Please check if you want to create/edit this page.', |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -467,6 +467,8 @@ |
468 | 468 | argument |
469 | 469 | * (bug 20136) Protection form JavaScript now synchronizes the expiry boxes on |
470 | 470 | any change, in addition to onkeyup. |
| 471 | +* Don't link to "edit this page" on MediaWiki:Noarticletext if user is not allowed |
| 472 | + to create page. Done via new message MediaWiki:Noarticletext-nopermission |
471 | 473 | |
472 | 474 | == API changes in 1.16 == |
473 | 475 | |