Index: trunk/phase3/includes/SpecialIpblocklist.php |
— | — | @@ -162,7 +162,7 @@ |
163 | 163 | } |
164 | 164 | |
165 | 165 | function showList( $msg ) { |
166 | | - global $wgOut; |
| 166 | + global $wgOut, $wgUser; |
167 | 167 | |
168 | 168 | $wgOut->setPagetitle( wfMsg( "ipblocklist" ) ); |
169 | 169 | if ( "" != $msg ) { |
— | — | @@ -176,6 +176,9 @@ |
177 | 177 | |
178 | 178 | $conds = array(); |
179 | 179 | $matches = array(); |
| 180 | + // Is user allowed to see all the blocks? |
| 181 | + if ( !$wgUser->isAllowed( 'oversight' ) ) |
| 182 | + $conds['ipb_deleted'] = 0; |
180 | 183 | if ( $this->ip == '' ) { |
181 | 184 | // No extra conditions |
182 | 185 | } elseif ( substr( $this->ip, 0, 1 ) == '#' ) { |
— | — | @@ -299,16 +302,20 @@ |
300 | 303 | |
301 | 304 | $line = wfMsgReplaceArgs( $msg['blocklistline'], array( $formattedTime, $blocker, $target, $properties ) ); |
302 | 305 | |
303 | | - $s = "<li>{$line}"; |
304 | | - |
| 306 | + $unblocklink = ''; |
305 | 307 | if ( $wgUser->isAllowed('block') ) { |
306 | 308 | $titleObj = SpecialPage::getTitleFor( "Ipblocklist" ); |
307 | | - $s .= ' (' . $sk->makeKnownLinkObj($titleObj, $msg['unblocklink'], 'action=unblock&id=' . urlencode( $block->mId ) ) . ')'; |
| 309 | + $unblocklink = ' (' . $sk->makeKnownLinkObj($titleObj, $msg['unblocklink'], 'action=unblock&id=' . urlencode( $block->mId ) ) . ')'; |
308 | 310 | } |
309 | | - $s .= $sk->commentBlock( $block->mReason ); |
310 | | - $s .= "</li>\n"; |
| 311 | + |
| 312 | + $comment = $sk->commentBlock( $block->mReason ); |
| 313 | + |
| 314 | + $s = "{$line} $comment"; |
| 315 | + if ( $block->mHideName ) |
| 316 | + $s = '<span class="history-deleted">' . $s . '</span>'; |
| 317 | + |
311 | 318 | wfProfileOut( __METHOD__ ); |
312 | | - return $s; |
| 319 | + return "<li>$s $unblocklink</li>\n"; |
313 | 320 | } |
314 | 321 | } |
315 | 322 | |