r96449 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96448‎ | r96449 | r96450 >
Date:17:00, 7 September 2011
Author:siebrand
Status:ok
Tags:
Comment:
Mark userLink, userTalkLink, blockLink() and emailLink() as public static per CR comment on r96420 by Nikerabbit.

He suggested protected, because of the @private comment, but as we have made more methods public static in the Linker class recently, this seems appropriate.
Modified paths:
  • /trunk/phase3/includes/Linker.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Linker.php
@@ -915,9 +915,8 @@
916916 * @param $userId Integer: user id in database.
917917 * @param $userText String: user name in database
918918 * @return String: HTML fragment
919 - * @private
920919 */
921 - static function userLink( $userId, $userText ) {
 920+ public static function userLink( $userId, $userText ) {
922921 if ( $userId == 0 ) {
923922 $page = SpecialPage::getTitleFor( 'Contributions', $userText );
924923 } else {
@@ -992,9 +991,8 @@
993992 * @param $userId Integer: user id in database.
994993 * @param $userText String: user name in database.
995994 * @return String: HTML fragment with user talk link
996 - * @private
997995 */
998 - static function userTalkLink( $userId, $userText ) {
 996+ public static function userTalkLink( $userId, $userText ) {
999997 $userTalkPage = Title::makeTitle( NS_USER_TALK, $userText );
1000998 $userTalkLink = self::link( $userTalkPage, wfMsgHtml( 'talkpagelinktext' ) );
1001999 return $userTalkLink;
@@ -1004,9 +1002,8 @@
10051003 * @param $userId Integer: userid
10061004 * @param $userText String: user name in database.
10071005 * @return String: HTML fragment with block link
1008 - * @private
10091006 */
1010 - static function blockLink( $userId, $userText ) {
 1007+ public static function blockLink( $userId, $userText ) {
10111008 $blockPage = SpecialPage::getTitleFor( 'Block', $userText );
10121009 $blockLink = self::link( $blockPage, wfMsgHtml( 'blocklink' ) );
10131010 return $blockLink;
@@ -1016,9 +1013,8 @@
10171014 * @param $userId Integer: userid
10181015 * @param $userText String: user name in database.
10191016 * @return String: HTML fragment with e-mail user link
1020 - * @private
10211017 */
1022 - static function emailLink( $userId, $userText ) {
 1018+ public static function emailLink( $userId, $userText ) {
10231019 $emailPage = SpecialPage::getTitleFor( 'Emailuser', $userText );
10241020 $emailLink = self::link( $emailPage, wfMsgHtml( 'emaillink' ) );
10251021 return $emailLink;

Follow-up revisions

RevisionCommit summaryAuthorDate
r968581.17wmf1: MFT r96430, r96449, r96773reedy16:25, 12 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r96420Add constant Linker::TOOL_LINKS_EMAIL to allow adding a "send e-mail" link fr...siebrand12:12, 7 September 2011

Status & tagging log