r58071 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58070‎ | r58071 | r58072 >
Date:21:33, 23 October 2009
Author:raymond
Status:ok
Tags:
Comment:
Add a 'no rseult' message.
Modified paths:
  • /trunk/extensions/GlobalBlocking/GlobalBlocking.i18n.php (modified) (history)
  • /trunk/extensions/GlobalBlocking/SpecialGlobalBlockList.php (modified) (history)

Diff [purge]

Index: trunk/extensions/GlobalBlocking/GlobalBlocking.i18n.php
@@ -54,6 +54,7 @@
5555 'globalblocking-list-whitelisted' => 'locally disabled by $1: $2',
5656 'globalblocking-list-whitelist' => 'local status',
5757 'globalblocking-list-modify' => 'modify',
 58+ 'globalblocking-list-noresults' => 'The requested IP address is not blocked.',
5859 'globalblocking-goto-block' => 'Globally block an IP address',
5960 'globalblocking-goto-unblock' => 'Remove a global block',
6061 'globalblocking-goto-status' => 'Change local status for a global block',
Index: trunk/extensions/GlobalBlocking/SpecialGlobalBlockList.php
@@ -102,10 +102,15 @@
103103 }
104104
105105 $pager = new GlobalBlockListPager( $this, $conds );
106 -
107 - $wgOut->addHTML( $pager->getNavigationBar() .
108 - Xml::tags( 'ul', null, $pager->getBody() ) .
109 - $pager->getNavigationBar() );
 106+ $body = $pager->getBody();
 107+ if( $body != '' ) {
 108+ $wgOut->addHTML( $pager->getNavigationBar() .
 109+ Html::rawElement( 'ul', array(), $body ) .
 110+ $pager->getNavigationBar() );
 111+ } else {
 112+ $wgOut->wrapWikiMsg( "<div class='mw-globalblocking-noresults'>\n$1</div>\n",
 113+ array( 'globalblocking-list-noresults' ) );
 114+ }
110115 }
111116
112117 function loadParameters() {

Status & tagging log