r96429 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96428‎ | r96429 | r96430 >
Date:13:30, 7 September 2011
Author:siebrand
Status:resolved (Comments)
Tags:
Comment:
Add "send e-mail" link on Special:Userrights and replace the "manual" tool links in the process.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialUserrights.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesQqq.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUserrights.php
@@ -433,13 +433,21 @@
434434 $autogrouplistintro = wfMessage( 'userrights-groupsmember-auto', $count)->parse();
435435 $grouplist .= '<p>' . $autogrouplistintro . ' ' . $this->getLang()->listToText( $autolist ) . "</p>\n";
436436 }
 437+
 438+ $userToolLinks = Linker::userToolLinks(
 439+ $user->getId(),
 440+ $user->getName(),
 441+ false, /* default for redContribsWhenNoEdits */
 442+ Linker::TOOL_LINKS_EMAIL /* Add "send e-mail" link */
 443+ );
 444+
437445 $this->getOutput()->addHTML(
438446 Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalURL(), 'name' => 'editGroup', 'id' => 'mw-userrights-form2' ) ) .
439447 Html::hidden( 'user', $this->mTarget ) .
440448 Html::hidden( 'wpEditToken', $this->getUser()->editToken( $this->mTarget ) ) .
441449 Xml::openElement( 'fieldset' ) .
442450 Xml::element( 'legend', array(), wfMsg( 'userrights-editusergroup' ) ) .
443 - wfMsgExt( 'editinguser', array( 'parse' ), wfEscapeWikiText( $user->getName() ) ) .
 451+ wfMsgExt( 'editinguser', array( 'parse' ), wfEscapeWikiText( $user->getName() ), $userToolLinks ) .
444452 wfMsgExt( 'userrights-groups-help', array( 'parse' ) ) .
445453 $grouplist .
446454 Xml::tags( 'p', null, $this->groupCheckboxes( $groups ) ) .
Index: trunk/phase3/languages/messages/MessagesQqq.php
@@ -1475,7 +1475,9 @@
14761476 'editusergroup' => 'Button name, in page [[Special:Userrights]] (only available to administrators), in the section named {{MediaWiki:userrights-lookup-user}}.
14771477
14781478 {{Identical|Edit user groups}}',
1479 -'editinguser' => "Appears on [[Special:UserRights]]. The '''last part''' of the message '''should remain completely untranslated''', but if your language has S-O-V word order, the verb can follow it.",
 1479+'editinguser' => "Appears on [[Special:UserRights]]. Parameters:
 1480+* $1 is a username
 1481+* $2 are user tool links. Example: \"(Talk | contribs | block | send e-mail)\".",
14801482 'userrights-editusergroup' => '{{Identical|Edit user groups}}',
14811483 'saveusergroups' => 'Button text when editing user groups',
14821484 'userrights-groupsmember' => 'Used when editing user groups in [[Special:Userrights]]. The messsage is followed by a list of group names.
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1885,7 +1885,7 @@
18861886 'userrights-lookup-user' => 'Manage user groups',
18871887 'userrights-user-editname' => 'Enter a username:',
18881888 'editusergroup' => 'Edit user groups',
1889 -'editinguser' => "Changing user rights of user '''[[User:$1|$1]]''' ([[User talk:$1|{{int:talkpagelinktext}}]]{{int:pipe-separator}}[[Special:Contributions/$1|{{int:contribslink}}]])",
 1889+'editinguser' => "Changing user rights of user '''[[User:$1|$1]]''' $2",
18901890 'userrights-editusergroup' => 'Edit user groups',
18911891 'saveusergroups' => 'Save user groups',
18921892 'userrights-groupsmember' => 'Member of:',

Follow-up revisions

RevisionCommit summaryAuthorDate
r96433Follow-up r96429: use wfMessage() to make it work properly. Previously $userT...siebrand13:52, 7 September 2011

Comments

#Comment by Siebrand (talk | contribs)   13:35, 7 September 2011

Escaping issues. Working on that...

Status & tagging log