r107213 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107212‎ | r107213 | r107214 >
Date:17:03, 24 December 2011
Author:ialex
Status:ok
Tags:
Comment:
* Use local context to get messages
* Use Language::userTimeAndDate() instead of Language::timeanddate() to use user's timezone preference
Modified paths:
  • /trunk/phase3/includes/specials/SpecialFileDuplicateSearch.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialFileDuplicateSearch.php
@@ -108,9 +108,9 @@
109109 Xml::openElement( 'form', array( 'id' => 'fileduplicatesearch', 'method' => 'get', 'action' => $wgScript ) ) .
110110 Html::hidden( 'title', $this->getTitle()->getPrefixedDbKey() ) .
111111 Xml::openElement( 'fieldset' ) .
112 - Xml::element( 'legend', null, wfMsg( 'fileduplicatesearch-legend' ) ) .
113 - Xml::inputLabel( wfMsg( 'fileduplicatesearch-filename' ), 'filename', 'filename', 50, $this->filename ) . ' ' .
114 - Xml::submitButton( wfMsg( 'fileduplicatesearch-submit' ) ) .
 112+ Xml::element( 'legend', null, $this->msg( 'fileduplicatesearch-legend' )->text() ) .
 113+ Xml::inputLabel( $this->msg( 'fileduplicatesearch-filename' )->text(), 'filename', 'filename', 50, $this->filename ) . ' ' .
 114+ Xml::submitButton( $this->msg( 'fileduplicatesearch-submit' )->text() ) .
115115 Xml::closeElement( 'fieldset' ) .
116116 Xml::closeElement( 'form' )
117117 );
@@ -132,12 +132,10 @@
133133 if( $thumb ) {
134134 $out->addHTML( '<div id="mw-fileduplicatesearch-icon">' .
135135 $thumb->toHtml( array( 'desc-link' => false ) ) . '<br />' .
136 - wfMsgExt( 'fileduplicatesearch-info', array( 'parse' ),
137 - $this->getLanguage()->formatNum( $img->getWidth() ),
138 - $this->getLanguage()->formatNum( $img->getHeight() ),
 136+ $this->msg( 'fileduplicatesearch-info' )->numParams(
 137+ $img->getWidth(), $img->getHeight() )->params(
139138 $this->getLanguage()->formatSize( $img->getSize() ),
140 - $img->getMimeType()
141 - ) .
 139+ $img->getMimeType() )->parseAsBlock() .
142140 '</div>' );
143141 }
144142 }
@@ -181,7 +179,7 @@
182180
183181 $userText = $result->getUser( 'text' );
184182 $user = Linker::link( Title::makeTitle( NS_USER, $userText ), $userText );
185 - $time = $this->getLanguage()->timeanddate( $result->getTimestamp() );
 183+ $time = $this->getLanguage()->userTimeAndDate( $result->getTimestamp(), $this->getUser() );
186184
187185 return "$plink . . $user . . $time";
188186 }

Status & tagging log