Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -1931,6 +1931,7 @@ |
1932 | 1932 | 'ipblocklist-sh-addressblocks', |
1933 | 1933 | 'ipblocklist-summary', |
1934 | 1934 | 'ipblocklist-submit', |
| 1935 | + 'ipblocklist-localblock', |
1935 | 1936 | 'ipblocklist-otherblocks', |
1936 | 1937 | 'blocklistline', |
1937 | 1938 | 'infiniteblock', |
Index: trunk/phase3/includes/specials/SpecialIpblocklist.php |
— | — | @@ -296,27 +296,36 @@ |
297 | 297 | $conds[] = "ipb_user != 0 OR ipb_range_end > ipb_range_start"; |
298 | 298 | } |
299 | 299 | |
| 300 | + // Search form |
| 301 | + $wgOut->addHTML( $this->searchForm() ); |
| 302 | + |
| 303 | + // Check for other blocks, i.e. global/tor blocks |
| 304 | + $otherBlockLink = array(); |
| 305 | + wfRunHooks( 'getOtherBlockLogLink', array( &$otherBlockLink, $this->ip ) ); |
| 306 | + |
| 307 | + // Show additional header for the local block only when other blocks exists. |
| 308 | + // Not necessary in a standard installation without such extensions enabled |
| 309 | + if( count( $otherBlockLink ) ) { |
| 310 | + $wgOut->addHTML( |
| 311 | + Html::rawElement( 'h2', array(), wfMsg( 'ipblocklist-localblock' ) ) . "\n" |
| 312 | + ); |
| 313 | + } |
300 | 314 | $pager = new IPBlocklistPager( $this, $conds ); |
301 | 315 | if ( $pager->getNumRows() ) { |
302 | 316 | $wgOut->addHTML( |
303 | | - $this->searchForm() . |
304 | 317 | $pager->getNavigationBar() . |
305 | 318 | Xml::tags( 'ul', null, $pager->getBody() ) . |
306 | 319 | $pager->getNavigationBar() |
307 | 320 | ); |
308 | 321 | } elseif ( $this->ip != '') { |
309 | | - $wgOut->addHTML( $this->searchForm() ); |
310 | 322 | $wgOut->addWikiMsg( 'ipblocklist-no-results' ); |
311 | 323 | } else { |
312 | | - $wgOut->addHTML( $this->searchForm() ); |
313 | 324 | $wgOut->addWikiMsg( 'ipblocklist-empty' ); |
314 | 325 | } |
315 | 326 | |
316 | | - $otherBlockLink = array(); |
317 | | - wfRunHooks( 'getOtherBlockLogLink', array( &$otherBlockLink, $this->ip ) ); |
318 | 327 | if( count( $otherBlockLink ) ) { |
319 | 328 | $wgOut->addHTML( |
320 | | - Html::rawElement( 'h2', array(), wfMsg( 'ipblocklist-otherblocks' ) ) . "\n" |
| 329 | + Html::rawElement( 'h2', array(), wfMsgExt( 'ipblocklist-otherblocks', 'parseinline', count( $otherBlockLink ) ) ) . "\n" |
321 | 330 | ); |
322 | 331 | $list = ''; |
323 | 332 | foreach( $otherBlockLink as $link ) { |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -2896,7 +2896,8 @@ |
2897 | 2897 | 'ipblocklist-sh-addressblocks' => '$1 single IP blocks', |
2898 | 2898 | 'ipblocklist-summary' => '', # do not translate or duplicate this message to other languages |
2899 | 2899 | 'ipblocklist-submit' => 'Search', |
2900 | | -'ipblocklist-otherblocks' => 'Other blocks', |
| 2900 | +'ipblocklist-localblock' => 'Local block', |
| 2901 | +'ipblocklist-otherblocks' => 'Other {{PLURAL:$1|block|blocks}}', |
2901 | 2902 | 'blocklistline' => '$1, $2 blocked $3 ($4)', |
2902 | 2903 | 'infiniteblock' => 'infinite', |
2903 | 2904 | 'expiringblock' => 'expires on $1 at $2', |