From df3111a963f529616efca15f85e7f4ba2c880df4 Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Wed, 6 Aug 2008 15:59:20 +0000 Subject: [PATCH] Reapply part of r38229 under consideration of Brions revert comment (r38249): * Add a nice fieldset for consistency with a better legend * Switch result line and input form in kind that the hotspot for "Show new images since..." link does not change when following new uploads --- includes/specials/SpecialNewimages.php | 24 +++++++++++++----------- languages/messages/MessagesEn.php | 2 ++ maintenance/language/messages.inc | 2 ++ 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/includes/specials/SpecialNewimages.php b/includes/specials/SpecialNewimages.php index 4892af6b1b..953efad320 100644 --- a/includes/specials/SpecialNewimages.php +++ b/includes/specials/SpecialNewimages.php @@ -136,6 +136,19 @@ function wfSpecialNewimages( $par, $specialPage ) { $lastTimestamp = $timestamp; } + $titleObj = SpecialPage::getTitleFor( 'Newimages' ); + $action = $titleObj->getLocalURL( $hidebots ? '' : 'hidebots=0' ); + if ( $shownav && !$wgMiserMode ) { + $wgOut->addHTML( + Xml::openElement( 'form', array( 'action' => $action, 'method' => 'post', 'id' => 'imagesearch' ) ) . + Xml::fieldset( wfMsg( 'newimages-legend' ) ) . + Xml::inputLabel( wfMsg( 'newimages-label' ), 'wpIlMatch', 'wpIlMatch', 20, $wpIlMatch ) . ' ' . + Xml::submitButton( wfMsg( 'ilsubmit' ), array( 'name' => 'wpIlSubmit' ) ) . + Xml::closeElement( 'fieldset' ) . + Xml::closeElement( 'form' ) + ); + } + $bydate = wfMsg( 'bydate' ); $lt = $wgLang->formatNum( min( $shownImages, $limit ) ); if ( $shownav ) { @@ -143,17 +156,6 @@ function wfSpecialNewimages( $par, $specialPage ) { $wgOut->addHTML( $text . "\n" ); } - $sub = wfMsg( 'ilsubmit' ); - $titleObj = SpecialPage::getTitleFor( 'Newimages' ); - $action = $titleObj->escapeLocalURL( $hidebots ? '' : 'hidebots=0' ); - if ($shownav && !$wgMiserMode) { - $wgOut->addHTML( "
" . - Xml::input( 'wpIlMatch', 20, $wpIlMatch ) . ' ' . - Xml::submitButton( $sub, array( 'name' => 'wpIlSubmit' ) ) . - "
" ); - } - /** * Paging controls... */ diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index a04bd7a682..cc75ea3a43 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -2819,6 +2819,8 @@ $1', 'newimages' => 'Gallery of new files', 'imagelisttext' => "Below is a list of '''$1''' {{PLURAL:$1|file|files}} sorted $2.", 'newimages-summary' => 'This special page shows the last uploaded files.', +'newimages-legend' => 'Filter', +'newimages-label' => 'Filename (or a part of it):', 'showhidebots' => '($1 bots)', 'noimages' => 'Nothing to see.', 'ilsubmit' => 'Search', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index e07a274d1d..1b971e8b3f 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -1986,6 +1986,8 @@ $wgMessageStructure = array( 'newimages', 'imagelisttext', 'newimages-summary', + 'newimages-legend', + 'newimages-label', 'showhidebots', 'noimages', 'ilsubmit', -- 2.20.1