From 8fafb027a2bcc670b32dd5129a2ff2bc45df1886 Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Tue, 2 Dec 2008 15:45:29 +0000 Subject: [PATCH] Move show/hide links into the searchForm and thereby into the fieldset for consistency with other special page with show/hide links --- includes/specials/SpecialIpblocklist.php | 37 +++++++++++------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/includes/specials/SpecialIpblocklist.php b/includes/specials/SpecialIpblocklist.php index cd28b66380..1f21a11bfa 100644 --- a/includes/specials/SpecialIpblocklist.php +++ b/includes/specials/SpecialIpblocklist.php @@ -292,7 +292,6 @@ class IPUnblockForm { if ( $pager->getNumRows() ) { $wgOut->addHTML( $this->searchForm() . - $this->showhideLinks() . $pager->getNavigationBar() . Xml::tags( 'ul', null, $pager->getBody() ) . $pager->getNavigationBar() @@ -301,26 +300,14 @@ class IPUnblockForm { $wgOut->addHTML( $this->searchForm() ); $wgOut->addWikiMsg( 'ipblocklist-no-results' ); } else { - $wgOut->addHTML( $this->searchForm() . $this->showhideLinks() ); + $wgOut->addHTML( $this->searchForm() ); $wgOut->addWikiMsg( 'ipblocklist-empty' ); } } function searchForm() { global $wgTitle, $wgScript, $wgRequest; - return - Xml::tags( 'form', array( 'action' => $wgScript ), - Xml::hidden( 'title', $wgTitle->getPrefixedDbKey() ) . - Xml::openElement( 'fieldset' ) . - Xml::element( 'legend', null, wfMsg( 'ipblocklist-legend' ) ) . - Xml::inputLabel( wfMsg( 'ipblocklist-username' ), 'ip', 'ip', /* size */ false, $this->ip ) . - ' ' . - Xml::submitButton( wfMsg( 'ipblocklist-submit' ) ) . - Xml::closeElement( 'fieldset' ) - ); - } - - function showhideLinks() { + $showhide = array( wfMsg( 'show' ), wfMsg( 'hide' ) ); $nondefaults = array(); if( $this->hideuserblocks ) { @@ -338,16 +325,26 @@ class IPUnblockForm { array( 'hidetempblocks' => 1-$this->hidetempblocks ), $nondefaults); $sipbLink = $this->makeOptionsLink( $showhide[1-$this->hideaddressblocks], array( 'hideaddressblocks' => 1-$this->hideaddressblocks ), $nondefaults); - + $links = array(); $links[] = wfMsgHtml( 'ipblocklist-sh-userblocks', $ubLink ); $links[] = wfMsgHtml( 'ipblocklist-sh-tempblocks', $tbLink ); $links[] = wfMsgHtml( 'ipblocklist-sh-addressblocks', $sipbLink ); - - $hl = '(' . implode( ' | ', $links ) . ')
'; - return $hl; + $hl = implode( ' ' . wfMsg( 'pipe-separator' ) . ' ', $links ); + + return + Xml::tags( 'form', array( 'action' => $wgScript ), + Xml::hidden( 'title', $wgTitle->getPrefixedDbKey() ) . + Xml::openElement( 'fieldset' ) . + Xml::element( 'legend', null, wfMsg( 'ipblocklist-legend' ) ) . + Xml::inputLabel( wfMsg( 'ipblocklist-username' ), 'ip', 'ip', /* size */ false, $this->ip ) . + ' ' . + Xml::submitButton( wfMsg( 'ipblocklist-submit' ) ) . '
' . + $hl . + Xml::closeElement( 'fieldset' ) + ); } - + /** * Makes change an option link which carries all the other options * @param $title see Title -- 2.20.1