r38229 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38228‎ | r38229 | r38230 >
Date:11:29, 30 July 2008
Author:raymond
Status:old
Tags:
Comment:
* 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.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialNewimages.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesDe.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -1991,6 +1991,8 @@
19921992 'newimages',
19931993 'imagelisttext',
19941994 'newimages-summary',
 1995+ 'newimages-legend',
 1996+ 'newimages-label',
19951997 'showhidebots',
19961998 'noimages',
19971999 'ilsubmit',
Index: trunk/phase3/includes/specials/SpecialNewimages.php
@@ -147,24 +147,26 @@
148148 $lastTimestamp = $timestamp;
149149 }
150150
 151+ $titleObj = SpecialPage::getTitleFor( 'Newimages' );
 152+ $action = $titleObj->getLocalURL( $hidebots ? '' : 'hidebots=0' );
 153+ if ( $shownav && !$wgMiserMode ) {
 154+ $wgOut->addHTML(
 155+ Xml::openElement( 'form', array( 'action' => $action, 'id' => 'imagesearch' ) ) .
 156+ Xml::fieldset( wfMsg( 'newimages-legend' ) ) .
 157+ Xml::inputLabel( wfMsg( 'newimages-label' ), 'wpIlMatch', 'wpIlMatch', 20, $wpIlMatch ) . ' ' .
 158+ Xml::submitButton( wfMsg( 'ilsubmit' ), array( 'name' => 'wpIlSubmit' ) ) .
 159+ Xml::closeElement( 'fieldset' ) .
 160+ Xml::closeElement( 'form' )
 161+ );
 162+ }
 163+
151164 $bydate = wfMsg( 'bydate' );
152165 $lt = $wgLang->formatNum( min( $shownImages, $limit ) );
153 - if ($shownav) {
154 - $text = wfMsgExt( 'imagelisttext', array('parse'), $lt, $bydate );
 166+ if ( $shownav && count( $images ) ) {
 167+ $text = wfMsgExt( 'imagelisttext', array( 'parse' ), $lt, $bydate );
155168 $wgOut->addHTML( $text . "\n" );
156169 }
157170
158 - $sub = wfMsg( 'ilsubmit' );
159 - $titleObj = SpecialPage::getTitleFor( 'Newimages' );
160 - $action = $titleObj->escapeLocalURL( $hidebots ? '' : 'hidebots=0' );
161 - if ($shownav && !$wgMiserMode) {
162 - $wgOut->addHTML( "<form id=\"imagesearch\" method=\"post\" action=\"" .
163 - "{$action}\">" .
164 - Xml::input( 'wpIlMatch', 20, $wpIlMatch ) . ' ' .
165 - Xml::submitButton( $sub, array( 'name' => 'wpIlSubmit' ) ) .
166 - "</form>" );
167 - }
168 -
169171 /**
170172 * Paging controls...
171173 */
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -2823,6 +2823,8 @@
28242824 'newimages' => 'Gallery of new files',
28252825 'imagelisttext' => "Below is a list of '''$1''' {{PLURAL:$1|file|files}} sorted $2.",
28262826 'newimages-summary' => 'This special page shows the last uploaded files.',
 2827+'newimages-legend' => 'Filename',
 2828+'newimages-label' => 'Filename (or a part of it):',
28272829 'showhidebots' => '($1 bots)',
28282830 'noimages' => 'Nothing to see.',
28292831 'ilsubmit' => 'Search',
Index: trunk/phase3/languages/messages/MessagesDe.php
@@ -2220,8 +2220,10 @@
22212221
22222222 # Special:Newimages
22232223 'newimages' => 'Neue Dateien',
2224 -'imagelisttext' => "Hier ist eine Liste von '''$1''' {{PLURAL:$1|Datei|Dateien}}, sortiert $2.",
 2224+'imagelisttext' => "Hier ist eine Liste mit '''$1''' {{PLURAL:$1|Datei|Dateien}}, sortiert $2.",
22252225 'newimages-summary' => 'Diese Spezialseite zeigt die zuletzt hochgeladenen Dateien an.',
 2226+'newimages-legend' => 'Dateiname',
 2227+'newimages-label' => 'Dateiname (oder ein Teil davon):',
22262228 'showhidebots' => '(Bots $1)',
22272229 'noimages' => 'Keine Dateien gefunden.',
22282230 'ilsubmit' => 'Suchen',

Follow-up revisions

RevisionCommit summaryAuthorDate
r38249Revert r38229:...brion19:55, 30 July 2008
r38719Reapply part of r38229 under consideration of Brions revert comment (r38249):...raymond15:59, 6 August 2008

Status & tagging log