summaryrefslogtreecommitdiff
path: root/includes/specials/SpecialMIMEsearch.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/specials/SpecialMIMEsearch.php')
-rw-r--r--includes/specials/SpecialMIMEsearch.php23
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";
}