From: Niklas Laxström Date: Thu, 10 May 2007 17:31:10 +0000 (+0000) Subject: * Don't show search box when the list is empty X-Git-Tag: 1.31.0-rc.0~52974 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=f34ccdad7c180e54653873bfdd2e620afc6a3032;p=lhc%2Fweb%2Fwiklou.git * Don't show search box when the list is empty --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 65b6e90f6d..0481f44d90 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -47,6 +47,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Tooltips for print version and permalink * Links to the MediaWiki namespace for system messages having their default values are no longer shown as nonexistent (e.g., in red) +* Special:Ipblocklist differentiates between empty list and no search results. == Maintenance script changes since 1.10 == diff --git a/includes/SpecialIpblocklist.php b/includes/SpecialIpblocklist.php index 9f705db2f8..079be45ac2 100644 --- a/includes/SpecialIpblocklist.php +++ b/includes/SpecialIpblocklist.php @@ -224,22 +224,20 @@ class IPUnblockForm { } } - # TODO: difference message between - # a) an real empty list and - # b) requested ip/username not on list $pager = new IPBlocklistPager( $this, $conds ); if ( $pager->getNumRows() ) { - $s = $this->searchForm() . - $pager->getNavigationBar(); - $s .= ""; - $s .= $pager->getNavigationBar(); + $wgOut->addHTML( + $this->searchForm() . + $pager->getNavigationBar() . + Xml::tags( 'ul', null, $pager->getBody() ) . + $pager->getNavigationBar() + ); + } elseif ( $this->ip != '') { + $wgOut->addHTML( $this->searchForm() ); + $wgOut->addWikiText( wfMsg( 'ipblocklist-no-results' ) ); } else { - $s = $this->searchForm() . - '

' . wfMsgHTML( 'ipblocklistempty' ) . '

'; + $wgOut->addWikiText( wfMsg( 'ipblocklist-empty' ) ); } - $wgOut->addHTML( $s ); } function searchForm() { diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 5c6ab2c780..e81d3bd846 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -2017,7 +2017,8 @@ to a previously blocked IP address or username.', 'anononlyblock' => 'anon. only', 'noautoblockblock' => 'autoblock disabled', 'createaccountblock' => 'account creation blocked', -'ipblocklistempty' => 'The blocklist is empty or the requested IP address/username is not blocked.', +'ipblocklist-empty' => 'The blocklist is empty.', +'ipblocklist-no-results' => 'The requested IP address or username is not blocked.', 'blocklink' => 'block', 'unblocklink' => 'unblock', 'contribslink' => 'contribs',