r95931 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95930‎ | r95931 | r95932 >
Date:04:26, 1 September 2011
Author:johnduhart
Status:reverted (Comments)
Tags:
Comment:
Follow-up r95930, consolidate into one message per CR
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -1606,14 +1606,12 @@
16071607 }
16081608
16091609 $curUP = $wgUser->getUserPage();
1610 - $sk = $wgOut->getSkin();
16111610 if ( $this->mTitle->getNamespace() == NS_USER
16121611 && substr( $this->mTitle->getPrefixedText(), 0, strlen( $curUP->getPrefixedText() ) ) != $curUP->getPrefixedText()
16131612 && $this->formtype != 'preview'
16141613 && $this->formtype != 'diff' )
16151614 {
1616 - $utpLink = $sk->makeKnownLinkObj( $this->mTitle->getTalkPage(), wfMsgHtml( 'editinguserpagetalklink' ), 'action=edit' );
1617 - $wgOut->addHTML( wfMsgWikiHtml( 'editinguserpage', $utpLink ) );
 1615+ $wgOut->addHTML( wfMessage( 'editinguserpage', $this->mTitle->getTalkPage()->getFullURL( 'action=edit' ) )->parse() );
16181616 }
16191617
16201618 if ( wfReadOnly() ) {
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1437,8 +1437,7 @@
14381438 'edit-no-change' => 'Your edit was ignored, because no change was made to the text.',
14391439 'edit-already-exists' => 'Could not create a new page.
14401440 It already exists.',
1441 -'editinguserpage' => "'''Note:''' You are editing a [[Help:User page|user page]]. To leave this user a message, $1.",
1442 -'editinguserpagetalklink' => 'edit their talk page',
 1441+'editinguserpage' => "'''Note:''' You are editing a [[Help:User page|user page]]. To leave this user a message, [$1 edit their talk page].",
14431442 'addsection-preload' => '', # do not translate or duplicate this message to other languages
14441443 'addsection-editintro' => '', # do not translate or duplicate this message to other languages
14451444

Follow-up revisions

RevisionCommit summaryAuthorDate
r96046Revert r95930, r95931 and r95939. Poorly commited patchjohnduhart21:32, 1 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r95930(bug 5865) Warning on editing other user's userpagejohnduhart03:56, 1 September 2011

Comments

#Comment by Dantman (talk | contribs)   06:30, 1 September 2011

If we're going so far that we're using [url text] syntax inside of a system message I don't think the talkpage url as a parameter serves any value anymore. This makes me think that $1 should just be the name of the user and fullurl and ns: should be used to make the link. This will also be important if in the future we have a better syntax to output edit links (one that doesn't create a class="external" link), using a url like this would make the message incompatible with such an upgrade.

#Comment by Nikerabbit (talk | contribs)   06:51, 1 September 2011

Just use $wgOut->wrapWikiMsg()

Status & tagging log