Index: trunk/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -157,13 +157,14 @@ |
158 | 158 | } else { |
159 | 159 | $user = $sk->link( $nt, htmlspecialchars( $nt->getText() ) ); |
160 | 160 | } |
| 161 | + $userObj = User::newFromName( $nt->getText(), /* check for username validity not needed */ false ); |
161 | 162 | $talk = $nt->getTalkPage(); |
162 | 163 | if( $talk ) { |
163 | 164 | # Talk page link |
164 | 165 | $tools[] = $sk->link( $talk, wfMsgHtml( 'sp-contributions-talk' ) ); |
165 | 166 | if( ( $id != 0 && $wgSysopUserBans ) || ( $id == 0 && IP::isIPAddress( $nt->getText() ) ) ) { |
166 | 167 | if( $wgUser->isAllowed( 'block' ) ) { # Block / Change block / Unblock links |
167 | | - if ( User::newFromId( $id )->isBlocked() ) { |
| 168 | + if ( $userObj->isBlocked() ) { |
168 | 169 | $tools[] = $sk->linkKnown( # Change block link |
169 | 170 | SpecialPage::getTitleFor( 'Blockip', $nt->getDBkey() ), |
170 | 171 | wfMsgHtml( 'change-blocklink' ) |
— | — | @@ -226,7 +227,7 @@ |
227 | 228 | $links = $wgLang->pipeList( $tools ); |
228 | 229 | |
229 | 230 | // Show a note if the user is blocked and display the last block log entry. |
230 | | - if ( User::newFromID( $id )->isBlocked() ) { |
| 231 | + if ( $userObj->isBlocked() ) { |
231 | 232 | LogEventsList::showLogExtract( |
232 | 233 | $wgOut, |
233 | 234 | 'block', |