diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2012-05-03 13:01:35 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2012-05-03 13:01:35 +0200 |
commit | d9022f63880ce039446fba8364f68e656b7bf4cb (patch) | |
tree | 16b40fbf17bf7c9ee6f4ead25b16dd192378050a /includes/specials/SpecialMIMEsearch.php | |
parent | 27cf83d177256813e2e802241085fce5dd0f3fb9 (diff) |
Update to MediaWiki 1.19.0
Diffstat (limited to 'includes/specials/SpecialMIMEsearch.php')
-rw-r--r-- | includes/specials/SpecialMIMEsearch.php | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/includes/specials/SpecialMIMEsearch.php b/includes/specials/SpecialMIMEsearch.php index aefe7bf5..2213ffa4 100644 --- a/includes/specials/SpecialMIMEsearch.php +++ b/includes/specials/SpecialMIMEsearch.php @@ -59,12 +59,11 @@ class MIMEsearchPage extends QueryPage { } function execute( $par ) { - global $wgRequest, $wgOut; - $mime = $par ? $par : $wgRequest->getText( 'mime' ); + $mime = $par ? $par : $this->getRequest()->getText( 'mime' ); $this->setHeaders(); $this->outputHeader(); - $wgOut->addHTML( + $this->getOutput()->addHTML( Xml::openElement( 'form', array( 'id' => 'specialmimesearch', 'method' => 'get', 'action' => SpecialPage::getTitleFor( 'MIMEsearch' )->getLocalUrl() ) ) . Xml::openElement( 'fieldset' ) . Html::hidden( 'title', SpecialPage::getTitleFor( 'MIMEsearch' )->getPrefixedText() ) . @@ -85,24 +84,24 @@ class MIMEsearchPage extends QueryPage { function formatResult( $skin, $result ) { - global $wgContLang, $wgLang; + global $wgContLang; $nt = Title::makeTitle( $result->namespace, $result->title ); $text = $wgContLang->convert( $nt->getText() ); - $plink = $skin->link( + $plink = Linker::link( Title::newFromText( $nt->getPrefixedText() ), htmlspecialchars( $text ) ); - $download = $skin->makeMediaLinkObj( $nt, wfMsgHtml( 'download' ) ); - $bytes = wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ), - $wgLang->formatNum( $result->img_size ) ); + $download = Linker::makeMediaLinkObj( $nt, wfMsgHtml( 'download' ) ); + $lang = $this->getLanguage(); + $bytes = htmlspecialchars( $lang->formatSize( $result->img_size ) ); $dimensions = htmlspecialchars( wfMsg( 'widthheight', - $wgLang->formatNum( $result->img_width ), - $wgLang->formatNum( $result->img_height ) + $lang->formatNum( $result->img_width ), + $lang->formatNum( $result->img_height ) ) ); - $user = $skin->link( Title::makeTitle( NS_USER, $result->img_user_text ), htmlspecialchars( $result->img_user_text ) ); - $time = htmlspecialchars( $wgLang->timeanddate( $result->img_timestamp ) ); + $user = Linker::link( Title::makeTitle( NS_USER, $result->img_user_text ), htmlspecialchars( $result->img_user_text ) ); + $time = htmlspecialchars( $lang->timeanddate( $result->img_timestamp ) ); return "($download) $plink . . $dimensions . . $bytes . . $user . . $time"; } |