From 410cf6c1bb49fe3baccd46aebfe4c4dc3f4a1699 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 24 Dec 2011 17:03:59 +0000 Subject: [PATCH] * Use local context to get messages * Use Language::userTimeAndDate() instead of Language::timeanddate() to use user's timezone preference --- includes/specials/SpecialFileDuplicateSearch.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/includes/specials/SpecialFileDuplicateSearch.php b/includes/specials/SpecialFileDuplicateSearch.php index 8f66b5c73a..18d19db80b 100644 --- a/includes/specials/SpecialFileDuplicateSearch.php +++ b/includes/specials/SpecialFileDuplicateSearch.php @@ -108,9 +108,9 @@ class FileDuplicateSearchPage extends QueryPage { Xml::openElement( 'form', array( 'id' => 'fileduplicatesearch', 'method' => 'get', 'action' => $wgScript ) ) . Html::hidden( 'title', $this->getTitle()->getPrefixedDbKey() ) . Xml::openElement( 'fieldset' ) . - Xml::element( 'legend', null, wfMsg( 'fileduplicatesearch-legend' ) ) . - Xml::inputLabel( wfMsg( 'fileduplicatesearch-filename' ), 'filename', 'filename', 50, $this->filename ) . ' ' . - Xml::submitButton( wfMsg( 'fileduplicatesearch-submit' ) ) . + Xml::element( 'legend', null, $this->msg( 'fileduplicatesearch-legend' )->text() ) . + Xml::inputLabel( $this->msg( 'fileduplicatesearch-filename' )->text(), 'filename', 'filename', 50, $this->filename ) . ' ' . + Xml::submitButton( $this->msg( 'fileduplicatesearch-submit' )->text() ) . Xml::closeElement( 'fieldset' ) . Xml::closeElement( 'form' ) ); @@ -132,12 +132,10 @@ class FileDuplicateSearchPage extends QueryPage { if( $thumb ) { $out->addHTML( '
' . $thumb->toHtml( array( 'desc-link' => false ) ) . '
' . - wfMsgExt( 'fileduplicatesearch-info', array( 'parse' ), - $this->getLanguage()->formatNum( $img->getWidth() ), - $this->getLanguage()->formatNum( $img->getHeight() ), + $this->msg( 'fileduplicatesearch-info' )->numParams( + $img->getWidth(), $img->getHeight() )->params( $this->getLanguage()->formatSize( $img->getSize() ), - $img->getMimeType() - ) . + $img->getMimeType() )->parseAsBlock() . '
' ); } } @@ -181,7 +179,7 @@ class FileDuplicateSearchPage extends QueryPage { $userText = $result->getUser( 'text' ); $user = Linker::link( Title::makeTitle( NS_USER, $userText ), $userText ); - $time = $this->getLanguage()->timeanddate( $result->getTimestamp() ); + $time = $this->getLanguage()->userTimeAndDate( $result->getTimestamp(), $this->getUser() ); return "$plink . . $user . . $time"; } -- 2.20.1