r63369 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63368‎ | r63369 | r63370 >
Date:18:29, 7 March 2010
Author:churchofemacs
Status:ok
Tags:
Comment:
reverting myself (r63361) due to comment #2 in bug 22756. Feature not needed
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesQqq.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -1253,23 +1253,14 @@
12541254 // Use the default message text
12551255 $text = $this->getContent();
12561256 } else {
1257 - # If it is a user (talk) page of the current user, add true as parameter, otherwise false.
1258 - $isCurrent = false;
1259 - if ( ( $this->mTitle->getNamespace() == NS_USER || $this->mTitle->getNamespace() == NS_USER_TALK )
1260 - && $wgUser->getName() == $this->mTitle->getBaseText() )
1261 - {
1262 - $isCurrent = true;
1263 - }
1264 -
1265 - # Don't show option "create this page" in the message if the user isn't allowed to.
12661257 $createErrors = $this->mTitle->getUserPermissionsErrors( 'create', $wgUser );
12671258 $editErrors = $this->mTitle->getUserPermissionsErrors( 'edit', $wgUser );
12681259 $errors = array_merge( $createErrors, $editErrors );
12691260
12701261 if ( !count( $errors ) )
1271 - $text = wfMsgNoTrans( 'noarticletext', $isCurrent );
 1262+ $text = wfMsgNoTrans( 'noarticletext' );
12721263 else
1273 - $text = wfMsgNoTrans( 'noarticletext-nopermission', $isCurrent );
 1264+ $text = wfMsgNoTrans( 'noarticletext-nopermission' );
12741265 }
12751266 $text = "<div class='noarticletext'>\n$text\n</div>";
12761267 if ( !$this->hasViewableContent() ) {
Index: trunk/phase3/includes/EditPage.php
@@ -722,19 +722,10 @@
723723 }
724724 # Try to add a custom edit intro, or use the standard one if this is not possible.
725725 if ( !$this->showCustomIntro() && !$this->mTitle->exists() ) {
726 - # If it is a user (talk) page of the current user, add true as parameter, otherwise false.
727 - $isCurrent = false;
728 - if ( ( $this->mTitle->getNamespace() == NS_USER || $this->mTitle->getNamespace() == NS_USER_TALK )
729 - && $wgUser->getName() == $this->mTitle->getBaseText() )
730 - {
731 - $isCurrent = true;
732 - }
733 -
734 - # Show standard message
735726 if ( $wgUser->isLoggedIn() ) {
736 - $wgOut->wrapWikiMsg( "<div class=\"mw-newarticletext\">\n$1</div>", array( 'newarticletext', $isCurrent ) );
 727+ $wgOut->wrapWikiMsg( "<div class=\"mw-newarticletext\">\n$1</div>", 'newarticletext' );
737728 } else {
738 - $wgOut->wrapWikiMsg( "<div class=\"mw-newarticletextanon\">\n$1</div>", array( 'newarticletext', $isCurrent ) );
 729+ $wgOut->wrapWikiMsg( "<div class=\"mw-newarticletextanon\">\n$1</div>", 'newarticletextanon' );
739730 }
740731 }
741732 # Give a notice if the user is editing a deleted/moved page...
Index: trunk/phase3/languages/messages/MessagesQqq.php
@@ -795,17 +795,11 @@
796796
797797 {{doc-important|Do not translate \"<nowiki>[[User talk:\$1|\$1]]</nowiki>\" and ''Special:ChangePassword''.}}",
798798 'newarticle' => '{{Identical|New}}',
799 -'newarticletext' => "Text displayed above the edit box in editor when trying to create a new page.<br />'''Very important:''' leave <tt><nowiki>{{MediaWiki:Helppage}}</nowiki></tt> exactly as it is!
800 -The following optional parameter should not be used in default localisations:
801 -* $1 is true when the page is a user (talk) page of the current user, otherwise false.",
 799+'newarticletext' => "Text displayed above the edit box in editor when trying to create a new page.<br />'''Very important:''' leave <tt><nowiki>{{MediaWiki:Helppage}}</nowiki></tt> exactly as it is!",
802800 'noarticletext' => 'This is the message that you get if you search for a term that has not yet got any entries on the wiki.
803801
804 -See also {{msg-mw|Noarticletext-nopermission}}.
805 -The following optional parameter should not be used in default localisations:
806 -* $1 is true when the page is a user (talk) page of the current user, otherwise false.',
807 -'noarticletext-nopermission' => 'See also {{msg-mw|Noarticletext}}.
808 -The following optional parameter should not be used in default localisations:
809 -* $1 is true when the page is a user (talk) page of the current user, otherwise false.',
 802+See also {{msg-mw|Noarticletext-nopermission}}.',
 803+'noarticletext-nopermission' => 'See also {{msg-mw|Noarticletext}}.',
810804 'userpage-userdoesnotexist' => 'Error message displayed when trying to edit or create a page or a subpage that belongs to a user who is not registered on the wiki',
811805 'userpage-userdoesnotexist-view' => 'Shown in user pages of non existing users. See for example [http://translatewiki.net/wiki/User:Foo User:Foo].',
812806 'clearyourcache' => 'Text at the top of .js/.css pages',
Index: trunk/phase3/RELEASE-NOTES
@@ -26,8 +26,6 @@
2727 * (bug 10183) Users can now add personal styles and scripts to all skins via
2828 User:<name>/common.css and /common.js (if user css/js is enabled)
2929 * (bug 22748) Add anchors on Special:ListGroupRights
30 -* (bug 22756) Adding a parameter to noarticletext/newarticletext which indicates
31 - if it's the current user's user (talk) page ($1 is true in that case)
3230
3331 === Bug fixes in 1.17 ===
3432 * (bug 17560) Half-broken deletion moved image files to deletion archive without

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r63361bug 22756: Add parameter to noarticletext/newarticletext indicating if it's t...churchofemacs16:26, 7 March 2010

Status & tagging log