Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -743,16 +743,11 @@ |
744 | 744 | $this->setRobotpolicy( 'noindex,nofollow' ); |
745 | 745 | $this->setArticleRelated( false ); |
746 | 746 | |
747 | | - $id = $wgUser->blockedBy(); |
| 747 | + $name = User::whoIs( $wgUser->blockedBy() ); |
748 | 748 | $reason = $wgUser->blockedFor(); |
749 | 749 | $blockTimestamp = $wgLang->timeanddate( wfTimestamp( TS_MW, $wgUser->mBlock->mTimestamp ), true ); |
750 | 750 | $ip = wfGetIP(); |
751 | 751 | |
752 | | - if ( is_numeric( $id ) ) { |
753 | | - $name = User::whoIs( $id ); |
754 | | - } else { |
755 | | - $name = $id; |
756 | | - } |
757 | 752 | $link = '[[' . $wgContLang->getNsText( NS_USER ) . ":{$name}|{$name}]]"; |
758 | 753 | |
759 | 754 | $blockid = $wgUser->mBlock->mId; |
Index: trunk/phase3/includes/api/ApiQueryUserInfo.php |
— | — | @@ -55,8 +55,7 @@ |
56 | 56 | $prop = array_flip($params['prop']); |
57 | 57 | if (isset($prop['blockinfo'])) { |
58 | 58 | if ($wgUser->isBlocked()) { |
59 | | - $id = $wgUser->blockedBy(); |
60 | | - $vals['blockedby'] = is_numeric($id) ? User::whoIs($id) : $id; |
| 59 | + $vals['blockedby'] = User::whoIs($wgUser->blockedBy()); |
61 | 60 | $vals['blockreason'] = $wgUser->blockedFor(); |
62 | 61 | } |
63 | 62 | } |