From b91abcb47ed2316152cff7bea3f6b37e4a65cc3e Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Fri, 16 Sep 2005 15:06:03 +0000 Subject: [PATCH] * Showing the uploader on the result page * Support [[Special:MIMEsearch/major/minor]] --- includes/SpecialMIMEsearch.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/includes/SpecialMIMEsearch.php b/includes/SpecialMIMEsearch.php index ed2268a270..76ea67808e 100644 --- a/includes/SpecialMIMEsearch.php +++ b/includes/SpecialMIMEsearch.php @@ -55,6 +55,7 @@ class MIMEsearchPage extends QueryPage { img_size, img_width, img_height, + img_user_text, img_timestamp FROM $image WHERE img_major_mime = $major AND img_minor_mime = $minor @@ -65,25 +66,26 @@ class MIMEsearchPage extends QueryPage { global $wgContLang, $wgLang; $nt = Title::makeTitle( $result->namespace, $result->title ); - $text = $wgContLang->convert( $nt->getPrefixedText() ); + $text = $wgContLang->convert( $nt->getText() ); $plink = $skin->makeLink( $nt->getPrefixedText(), $text ); $download = $skin->makeMediaLink( $nt->getText(), 'fuck me!', wfMsgHtml( 'download' ) ); $bytes = wfMsg( 'nbytes', $wgLang->formatNum( $result->img_size ) ); $dimensions = wfMsg( 'widthheight', $result->img_width, $result->img_height ); + $user = $skin->makeLinkObj( Title::makeTitle( NS_USER, $result->img_user_text ), $result->img_user_text ); $time = $wgLang->timeanddate( $result->img_timestamp ); - return "($download) $plink .. $dimensions .. $bytes .. $time"; + return "($download) $plink .. $dimensions .. $bytes .. $user .. $time"; } } /** * constructor */ -function wfSpecialMIMEsearch() { +function wfSpecialMIMEsearch( $par = null ) { global $wgRequest, $wgTitle, $wgOut; - $mime = $wgRequest->getText( 'mime' ); + $mime = isset( $par ) ? $par : $wgRequest->getText( 'mime' ); $wgOut->addHTML( wfElement( 'form', -- 2.20.1