/**
* Searches the database for files of the requested MIME type, comparing this with the
* 'img_major_mime' and 'img_minor_mime' fields in the image table.
- * @addtogroup SpecialPage
*/
class MIMEsearchPage extends QueryPage {
var $major, $minor;
$mime = isset( $par ) ? $par : $wgRequest->getText( 'mime' );
$wgOut->addHTML(
- Xml::openElement( 'form',
- array(
- 'id' => 'specialmimesearch',
- 'method' => 'get',
- 'action' => $wgTitle->escapeLocalUrl()
- )
- ) .
- Xml::inputLabel( wfMsg( 'mimetype' ), 'mime', 'mime', 20, $mime ) .
- Xml::submitButton( wfMsg( 'ilsubmit' ) ) .
+ Xml::openElement( 'form', array( 'id' => 'specialmimesearch', 'method' => 'get', 'action' => $wgTitle->getLocalUrl() ) ) .
+ Xml::openElement( 'fieldset' ) .
+ Xml::element( 'legend', null, wfMsg( 'mimesearch' ) ) .
+ Xml::inputLabel( wfMsg( 'mimetype' ), 'mime', 'mime', 20, $mime ) . ' ' .
+ Xml::submitButton( wfMsg( 'ilsubmit' ) ) .
+ Xml::closeElement( 'fieldset' ) .
Xml::closeElement( 'form' )
);
if( strpos( $str, '/' ) === false) {
return array ('', '');
}
-
+
list( $major, $minor ) = explode( '/', $str, 2 );
return array(
return in_array( $type, $types );
}
-