r112912 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112911‎ | r112912 | r112913 >
Date:19:39, 2 March 2012
Author:ialex
Status:ok
Tags:
Comment:
Use local context to get messages
Modified paths:
  • /trunk/phase3/includes/specials/SpecialListfiles.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialListfiles.php
@@ -107,15 +107,15 @@
108108 if ( !$this->mFieldNames ) {
109109 global $wgMiserMode;
110110 $this->mFieldNames = array(
111 - 'img_timestamp' => wfMsg( 'listfiles_date' ),
112 - 'img_name' => wfMsg( 'listfiles_name' ),
113 - 'thumb' => wfMsg( 'listfiles_thumb' ),
114 - 'img_size' => wfMsg( 'listfiles_size' ),
115 - 'img_user_text' => wfMsg( 'listfiles_user' ),
116 - 'img_description' => wfMsg( 'listfiles_description' ),
 111+ 'img_timestamp' => $this->msg( 'listfiles_date' )->text(),
 112+ 'img_name' => $this->msg( 'listfiles_name' )->text(),
 113+ 'thumb' => $this->msg( 'listfiles_thumb' )->text(),
 114+ 'img_size' => $this->msg( 'listfiles_size' )->text(),
 115+ 'img_user_text' => $this->msg( 'listfiles_user' )->text(),
 116+ 'img_description' => $this->msg( 'listfiles_description' )->text(),
117117 );
118118 if( !$wgMiserMode ) {
119 - $this->mFieldNames['count'] = wfMsg( 'listfiles_count' );
 119+ $this->mFieldNames['count'] = $this->msg( 'listfiles_count' )->text();
120120 }
121121 }
122122 return $this->mFieldNames;
@@ -201,7 +201,7 @@
202202 return htmlspecialchars( $this->getLanguage()->timeanddate( $value, true ) );
203203 case 'img_name':
204204 static $imgfile = null;
205 - if ( $imgfile === null ) $imgfile = wfMsg( 'imgfile' );
 205+ if ( $imgfile === null ) $imgfile = $this->msg( 'imgfile' )->text();
206206
207207 // Weird files can maybe exist? Bug 22227
208208 $filePage = Title::makeTitleSafe( NS_FILE, $value );
@@ -253,7 +253,7 @@
254254 ) );
255255 return Html::openElement( 'form',
256256 array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listfiles-form' ) ) .
257 - Xml::fieldset( wfMsg( 'listfiles' ) ) .
 257+ Xml::fieldset( $this->msg( 'listfiles' )->text() ) .
258258 Xml::buildForm( $inputForm, 'table_pager_limit_submit' ) .
259259 $this->getHiddenFields( array( 'limit', 'ilsearch', 'user' ) ) .
260260 Html::closeElement( 'fieldset' ) .

Sign-offs

UserFlagDate
Nikerabbitinspected06:32, 5 March 2012

Status & tagging log