From: Niklas Laxström Date: Thu, 17 Apr 2008 19:41:49 +0000 (+0000) Subject: * Clean up X-Git-Tag: 1.31.0-rc.0~48224 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=0762b372b5a09069649bc3187b92eb47d861e947;p=lhc%2Fweb%2Fwiklou.git * Clean up * Move one unused message to extension --- diff --git a/includes/SpecialImagelist.php b/includes/SpecialImagelist.php index ed7572917d..c0c9db8961 100644 --- a/includes/SpecialImagelist.php +++ b/includes/SpecialImagelist.php @@ -15,12 +15,7 @@ function wfSpecialImagelist() { $limit = $pager->getForm(); $body = $pager->getBody(); $nav = $pager->getNavigationBar(); - $wgOut->addHTML( - $limit - . '
' - . $body - . '
' - . $nav ); + $wgOut->addHTML( "$limit
\n$body
\n$nav" ); } /** @@ -29,7 +24,6 @@ function wfSpecialImagelist() { */ class ImageListPager extends TablePager { var $mFieldNames = null; - var $mMessages = array(); var $mQueryConds = array(); function __construct() { @@ -100,10 +94,6 @@ class ImageListPager extends TablePager { $lb->execute(); } - # Cache messages used in each row - $this->mMessages['imgdesc'] = wfMsgHtml( 'imgdesc' ); - $this->mMessages['imgfile'] = wfMsgHtml( 'imgfile' ); - return parent::getStartBody(); } @@ -113,11 +103,14 @@ class ImageListPager extends TablePager { case 'img_timestamp': return $wgLang->timeanddate( $value, true ); case 'img_name': + static $imgfile = null; + if ( $imgfile === null ) $imgfile = wfMsg( 'imgfile' ); + $name = $this->mCurrentRow->img_name; $link = $this->getSkin()->makeKnownLinkObj( Title::makeTitle( NS_IMAGE, $name ), $value ); $image = wfLocalFile( $value ); $url = $image->getURL(); - $download = Xml::element('a', array( "href" => $url ), $this->mMessages['imgfile'] ); + $download = Xml::element('a', array( 'href' => $url ), $imgfile ); return "$link ($download)"; case 'img_user_text': if ( $this->mCurrentRow->img_user ) { @@ -139,16 +132,16 @@ class ImageListPager extends TablePager { $search = $wgRequest->getText( 'ilsearch' ); $s = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $this->getTitle()->getLocalURL(), 'id' => 'mw-imagelist-form' ) ) . - Xml::openElement( 'fieldset' ) . - Xml::element( 'legend', null, wfMsg( 'imagelist' ) ) . - wfMsgHtml( 'table_pager_limit', $this->getLimitSelect() ); + Xml::openElement( 'fieldset' ) . + Xml::element( 'legend', null, wfMsg( 'imagelist' ) ) . + Xml::tags( 'label', null, wfMsgHtml( 'table_pager_limit', $this->getLimitSelect() ) ); if ( !$wgMiserMode ) { - $s .= "
\n" . + $s .= "
\n" . Xml::inputLabel( wfMsg( 'imagelist_search_for' ), 'ilsearch', 'mw-ilsearch', 20, $search ); } $s .= ' ' . - Xml::submitButton( wfMsg( 'table_pager_limit_submit' ) ) ." \n" . + Xml::submitButton( wfMsg( 'table_pager_limit_submit' ) ) ."\n" . $this->getHiddenFields( array( 'limit', 'ilsearch' ) ) . Xml::closeElement( 'fieldset' ) . Xml::closeElement( 'form' ) . "\n"; diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 29c5f46861..755c5771d9 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1633,7 +1633,6 @@ You may want to try at a less busy time.', By default the last uploaded files are shown at top of the list. A click on a column header changes the sorting.', 'imagelist_search_for' => 'Search for media name:', -'imgdesc' => 'desc', 'imgfile' => 'file', 'imagelist' => 'File list', 'imagelist_date' => 'Date',