From f34ccdad7c180e54653873bfdd2e620afc6a3032 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Thu, 10 May 2007 17:31:10 +0000 Subject: [PATCH] * Don't show search box when the list is empty --- RELEASE-NOTES | 1 + includes/SpecialIpblocklist.php | 22 ++++++++++------------ languages/messages/MessagesEn.php | 3 ++- 3 files changed, 13 insertions(+), 13 deletions(-) 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', -- 2.20.1