From 2b32fff0d477cdbf1b823c8a0d9954ed056d74e2 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Fri, 2 Mar 2012 19:39:07 +0000 Subject: [PATCH] Use local context to get messages --- includes/specials/SpecialListfiles.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/includes/specials/SpecialListfiles.php b/includes/specials/SpecialListfiles.php index b57549919e..fd48cb08dd 100644 --- a/includes/specials/SpecialListfiles.php +++ b/includes/specials/SpecialListfiles.php @@ -107,15 +107,15 @@ class ImageListPager extends TablePager { if ( !$this->mFieldNames ) { global $wgMiserMode; $this->mFieldNames = array( - 'img_timestamp' => wfMsg( 'listfiles_date' ), - 'img_name' => wfMsg( 'listfiles_name' ), - 'thumb' => wfMsg( 'listfiles_thumb' ), - 'img_size' => wfMsg( 'listfiles_size' ), - 'img_user_text' => wfMsg( 'listfiles_user' ), - 'img_description' => wfMsg( 'listfiles_description' ), + 'img_timestamp' => $this->msg( 'listfiles_date' )->text(), + 'img_name' => $this->msg( 'listfiles_name' )->text(), + 'thumb' => $this->msg( 'listfiles_thumb' )->text(), + 'img_size' => $this->msg( 'listfiles_size' )->text(), + 'img_user_text' => $this->msg( 'listfiles_user' )->text(), + 'img_description' => $this->msg( 'listfiles_description' )->text(), ); if( !$wgMiserMode ) { - $this->mFieldNames['count'] = wfMsg( 'listfiles_count' ); + $this->mFieldNames['count'] = $this->msg( 'listfiles_count' )->text(); } } return $this->mFieldNames; @@ -201,7 +201,7 @@ class ImageListPager extends TablePager { return htmlspecialchars( $this->getLanguage()->timeanddate( $value, true ) ); case 'img_name': static $imgfile = null; - if ( $imgfile === null ) $imgfile = wfMsg( 'imgfile' ); + if ( $imgfile === null ) $imgfile = $this->msg( 'imgfile' )->text(); // Weird files can maybe exist? Bug 22227 $filePage = Title::makeTitleSafe( NS_FILE, $value ); @@ -253,7 +253,7 @@ class ImageListPager extends TablePager { ) ); return Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listfiles-form' ) ) . - Xml::fieldset( wfMsg( 'listfiles' ) ) . + Xml::fieldset( $this->msg( 'listfiles' )->text() ) . Xml::buildForm( $inputForm, 'table_pager_limit_submit' ) . $this->getHiddenFields( array( 'limit', 'ilsearch', 'user' ) ) . Html::closeElement( 'fieldset' ) . -- 2.20.1