Index: trunk/phase3/includes/specials/SpecialMIMEsearch.php |
— | — | @@ -59,12 +59,11 @@ |
60 | 60 | } |
61 | 61 | |
62 | 62 | function execute( $par ) { |
63 | | - global $wgRequest, $wgOut; |
64 | | - $mime = $par ? $par : $wgRequest->getText( 'mime' ); |
| 63 | + $mime = $par ? $par : $this->getRequest()->getText( 'mime' ); |
65 | 64 | |
66 | 65 | $this->setHeaders(); |
67 | 66 | $this->outputHeader(); |
68 | | - $wgOut->addHTML( |
| 67 | + $this->getOutput()->addHTML( |
69 | 68 | Xml::openElement( 'form', array( 'id' => 'specialmimesearch', 'method' => 'get', 'action' => SpecialPage::getTitleFor( 'MIMEsearch' )->getLocalUrl() ) ) . |
70 | 69 | Xml::openElement( 'fieldset' ) . |
71 | 70 | Html::hidden( 'title', SpecialPage::getTitleFor( 'MIMEsearch' )->getPrefixedText() ) . |
— | — | @@ -85,24 +84,25 @@ |
86 | 85 | |
87 | 86 | |
88 | 87 | function formatResult( $skin, $result ) { |
89 | | - global $wgContLang, $wgLang; |
| 88 | + global $wgContLang; |
90 | 89 | |
91 | 90 | $nt = Title::makeTitle( $result->namespace, $result->title ); |
92 | 91 | $text = $wgContLang->convert( $nt->getText() ); |
93 | | - $plink = $skin->link( |
| 92 | + $plink = Linker::link( |
94 | 93 | Title::newFromText( $nt->getPrefixedText() ), |
95 | 94 | htmlspecialchars( $text ) |
96 | 95 | ); |
97 | 96 | |
98 | | - $download = $skin->makeMediaLinkObj( $nt, wfMsgHtml( 'download' ) ); |
| 97 | + $download = Linker::makeMediaLinkObj( $nt, wfMsgHtml( 'download' ) ); |
| 98 | + $lang = $this->getLang(); |
99 | 99 | $bytes = wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ), |
100 | | - $wgLang->formatNum( $result->img_size ) ); |
| 100 | + $lang->formatNum( $result->img_size ) ); |
101 | 101 | $dimensions = htmlspecialchars( wfMsg( 'widthheight', |
102 | | - $wgLang->formatNum( $result->img_width ), |
103 | | - $wgLang->formatNum( $result->img_height ) |
| 102 | + $lang->formatNum( $result->img_width ), |
| 103 | + $lang->formatNum( $result->img_height ) |
104 | 104 | ) ); |
105 | | - $user = $skin->link( Title::makeTitle( NS_USER, $result->img_user_text ), htmlspecialchars( $result->img_user_text ) ); |
106 | | - $time = htmlspecialchars( $wgLang->timeanddate( $result->img_timestamp ) ); |
| 105 | + $user = Linker::link( Title::makeTitle( NS_USER, $result->img_user_text ), htmlspecialchars( $result->img_user_text ) ); |
| 106 | + $time = htmlspecialchars( $lang->timeanddate( $result->img_timestamp ) ); |
107 | 107 | |
108 | 108 | return "($download) $plink . . $dimensions . . $bytes . . $user . . $time"; |
109 | 109 | } |