Index: branches/wmf/1.17wmf1/includes/Linker.php |
— | — | @@ -835,9 +835,9 @@ |
836 | 836 | * @param $userId Integer: user id in database. |
837 | 837 | * @param $userText String: user name in database |
838 | 838 | * @return String: HTML fragment |
839 | | - * @private |
840 | 839 | */ |
841 | | - function userLink( $userId, $userText ) { |
| 840 | + |
| 841 | + public static function userLink( $userId, $userText ) { |
842 | 842 | if ( $userId == 0 ) { |
843 | 843 | $page = SpecialPage::getTitleFor( 'Contributions', $userText ); |
844 | 844 | } else { |
— | — | @@ -860,8 +860,8 @@ |
861 | 861 | public function userToolLinks( $userId, $userText, $redContribsWhenNoEdits = false, $flags = 0, $edits = null ) { |
862 | 862 | global $wgUser, $wgDisableAnonTalk, $wgSysopUserBans, $wgLang; |
863 | 863 | $talkable = !( $wgDisableAnonTalk && 0 == $userId ); |
864 | | - $blockable = ( $wgSysopUserBans || 0 == $userId ) && !$flags & self::TOOL_LINKS_NOBLOCK; |
865 | | - $addEmailLink = $flags & self::TOOL_LINKS_EMAIL; |
| 864 | + $blockable = !( $flags & self::TOOL_LINKS_NOBLOCK ); |
| 865 | + $addEmailLink = $flags & self::TOOL_LINKS_EMAIL && $userId; |
866 | 866 | |
867 | 867 | $items = array(); |
868 | 868 | if ( $talkable ) { |
— | — | @@ -910,9 +910,8 @@ |
911 | 911 | * @param $userId Integer: user id in database. |
912 | 912 | * @param $userText String: user name in database. |
913 | 913 | * @return String: HTML fragment with user talk link |
914 | | - * @private |
915 | 914 | */ |
916 | | - function userTalkLink( $userId, $userText ) { |
| 915 | + public static function userTalkLink( $userId, $userText ) { |
917 | 916 | $userTalkPage = Title::makeTitle( NS_USER_TALK, $userText ); |
918 | 917 | $userTalkLink = $this->link( $userTalkPage, wfMsgHtml( 'talkpagelinktext' ) ); |
919 | 918 | return $userTalkLink; |
— | — | @@ -922,11 +921,11 @@ |
923 | 922 | * @param $userId Integer: userid |
924 | 923 | * @param $userText String: user name in database. |
925 | 924 | * @return String: HTML fragment with block link |
926 | | - * @private |
927 | 925 | */ |
928 | | - function blockLink( $userId, $userText ) { |
929 | | - $blockPage = SpecialPage::getTitleFor( 'Blockip', $userText ); |
930 | | - $blockLink = $this->link( $blockPage, wfMsgHtml( 'blocklink' ) ); |
| 926 | + |
| 927 | + public static function blockLink( $userId, $userText ) { |
| 928 | + $blockPage = SpecialPage::getTitleFor( 'Block', $userText ); |
| 929 | + $blockLink = self::link( $blockPage, wfMsgHtml( 'blocklink' ) ); |
931 | 930 | return $blockLink; |
932 | 931 | } |
933 | 932 | |
— | — | @@ -934,10 +933,9 @@ |
935 | 934 | * @param $userId Integer: userid |
936 | 935 | * @param $userText String: user name in database. |
937 | 936 | * @return String: HTML fragment with e-mail user link |
938 | | - * @private |
939 | 937 | */ |
940 | | - static function emailLink( $userId, $userText ) { |
941 | | - $emailPage = SpecialPage::getTitleFor( 'EmailUser', $userText ); |
| 938 | + public static function emailLink( $userId, $userText ) { |
| 939 | + $emailPage = SpecialPage::getTitleFor( 'Emailuser', $userText ); |
942 | 940 | $emailLink = self::link( $emailPage, wfMsgHtml( 'emaillink' ) ); |
943 | 941 | return $emailLink; |
944 | 942 | } |