Revert r38229:
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 30 Jul 2008 19:55:11 +0000 (19:55 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 30 Jul 2008 19:55:11 +0000 (19:55 +0000)
"* Add a nice fieldset for consistency
* Switch result line and input form
* Do not show result line "Below is a list of 0 files...". We have the message 'noimages' instead."

Fieldset label duplicates inputbox label, which looks kind of odd to me.
Moving lines around when set is empty changes the click hotspot for "Show new images since..." link, which is pretty annoying when following new uploads

includes/specials/SpecialNewimages.php
languages/messages/MessagesDe.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index b7a5280..e57f6fc 100644 (file)
@@ -147,26 +147,24 @@ 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, '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 && count( $images ) ) {
-               $text = wfMsgExt( 'imagelisttext', array( 'parse' ), $lt, $bydate );
+       if ($shownav) {
+               $text = wfMsgExt( 'imagelisttext', array('parse'), $lt, $bydate );
                $wgOut->addHTML( $text . "\n" );
        }
 
+       $sub = wfMsg( 'ilsubmit' );
+       $titleObj = SpecialPage::getTitleFor( 'Newimages' );
+       $action = $titleObj->escapeLocalURL( $hidebots ? '' : 'hidebots=0' );
+       if ($shownav && !$wgMiserMode) {
+               $wgOut->addHTML( "<form id=\"imagesearch\" method=\"post\" action=\"" .
+                 "{$action}\">" .
+                       Xml::input( 'wpIlMatch', 20, $wpIlMatch ) . ' ' .
+                 Xml::submitButton( $sub, array( 'name' => 'wpIlSubmit' ) ) .
+                 "</form>" );
+       }
+
        /**
         * Paging controls...
         */
index 90e6b60..6b07118 100644 (file)
@@ -2220,10 +2220,8 @@ $1',
 
 # Special:Newimages
 'newimages'             => 'Neue Dateien',
-'imagelisttext'         => "Hier ist eine Liste mit '''$1''' {{PLURAL:$1|Datei|Dateien}}, sortiert $2.",
+'imagelisttext'         => "Hier ist eine Liste von '''$1''' {{PLURAL:$1|Datei|Dateien}}, sortiert $2.",
 'newimages-summary'     => 'Diese Spezialseite zeigt die zuletzt hochgeladenen Dateien an.',
-'newimages-legend'      => 'Dateiname',
-'newimages-label'       => 'Dateiname (oder ein Teil davon):',
 'showhidebots'          => '(Bots $1)',
 'noimages'              => 'Keine Dateien gefunden.',
 'ilsubmit'              => 'Suchen',
index 6fe4498..7f7534a 100644 (file)
@@ -2822,8 +2822,6 @@ $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'      => 'Filename',
-'newimages-label'       => 'Filename (or a part of it):',
 'showhidebots'          => '($1 bots)',
 'noimages'              => 'Nothing to see.',
 'ilsubmit'              => 'Search',
index 18649c2..82f69a4 100644 (file)
@@ -1991,8 +1991,6 @@ $wgMessageStructure = array(
                'newimages',
                'imagelisttext',
                'newimages-summary',
-               'newimages-legend',
-               'newimages-label',
                'showhidebots',
                'noimages',
                'ilsubmit',