r32153 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r32152‎ | r32153 | r32154 >
Date:06:33, 19 March 2008
Author:raymond
Status:old
Tags:
Comment:
* Add a nice fieldset around the input form
* Fix double escaping
Modified paths:
  • /trunk/phase3/includes/SpecialMIMEsearch.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialMIMEsearch.php
@@ -12,7 +12,6 @@
1313 /**
1414 * Searches the database for files of the requested MIME type, comparing this with the
1515 * 'img_major_mime' and 'img_minor_mime' fields in the image table.
16 - * @addtogroup SpecialPage
1716 */
1817 class MIMEsearchPage extends QueryPage {
1918 var $major, $minor;
@@ -87,15 +86,12 @@
8887 $mime = isset( $par ) ? $par : $wgRequest->getText( 'mime' );
8988
9089 $wgOut->addHTML(
91 - Xml::openElement( 'form',
92 - array(
93 - 'id' => 'specialmimesearch',
94 - 'method' => 'get',
95 - 'action' => $wgTitle->escapeLocalUrl()
96 - )
97 - ) .
98 - Xml::inputLabel( wfMsg( 'mimetype' ), 'mime', 'mime', 20, $mime ) .
99 - Xml::submitButton( wfMsg( 'ilsubmit' ) ) .
 90+ Xml::openElement( 'form', array( 'id' => 'specialmimesearch', 'method' => 'get', 'action' => $wgTitle->getLocalUrl() ) ) .
 91+ Xml::openElement( 'fieldset' ) .
 92+ Xml::element( 'legend', null, wfMsg( 'mimesearch' ) ) .
 93+ Xml::inputLabel( wfMsg( 'mimetype' ), 'mime', 'mime', 20, $mime ) . ' ' .
 94+ Xml::submitButton( wfMsg( 'ilsubmit' ) ) .
 95+ Xml::closeElement( 'fieldset' ) .
10096 Xml::closeElement( 'form' )
10197 );
10298
@@ -113,7 +109,7 @@
114110 if( strpos( $str, '/' ) === false) {
115111 return array ('', '');
116112 }
117 -
 113+
118114 list( $major, $minor ) = explode( '/', $str, 2 );
119115
120116 return array(
@@ -138,4 +134,3 @@
139135
140136 return in_array( $type, $types );
141137 }
142 -

Follow-up revisions

RevisionCommit summaryAuthorDate
r32154Partially merge of r32153: fix double escapingraymond06:35, 19 March 2008

Status & tagging log