r78304 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78303‎ | r78304 | r78305 >
Date:15:08, 13 December 2010
Author:ialex
Status:deferred
Tags:
Comment:
Removed wfLoadExtensionMessages() calls
Modified paths:
  • /trunk/extensions/OnlineStatus/OnlineStatus.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OnlineStatus/OnlineStatus.php
@@ -100,7 +100,6 @@
101101 */
102102 static function Ajax( $action, $stat = false ){
103103 global $wgUser;
104 - wfLoadExtensionMessages( 'OnlineStatus' );
105104
106105 if( $wgUser->isAnon() )
107106 return wfMsgHtml( 'onlinestatus-js-anon' );
@@ -160,7 +159,6 @@
161160 if( $status === null )
162161 return array( 'found' => false );
163162 if( empty( $raw ) ){
164 - wfLoadExtensionMessages( 'OnlineStatus' );
165163 return wfMsgNoTrans( 'onlinestatus-toggle-' . $status );
166164 } else {
167165 return $status;
@@ -184,7 +182,6 @@
185183 $status = self::GetUserStatus( $parser->getTitle() );
186184 if( $status === null )
187185 return true;
188 - wfLoadExtensionMessages( 'OnlineStatus' );
189186 $ret = wfMsgNoTrans( 'onlinestatus-toggle-' . $status );
190187 $varCache['onlinestatus'] = $ret;
191188 } else if( $index == 'onlinestatus_word_raw' ){
@@ -201,8 +198,6 @@
202199 * Hook for user preferences
203200 */
204201 public static function GetPreferences( $user, &$preferences ) {
205 - wfLoadExtensionMessages( 'OnlineStatus' );
206 -
207202 $msg = wfMsgForContentNoTrans( 'onlinestatus-levels' );
208203 $lines = explode( "\n", $msg );
209204 $radios = array();
@@ -293,7 +288,6 @@
294289 $status = self::GetUserStatus( $wgTitle, true );
295290 if( $status === null )
296291 return true;
297 - wfLoadExtensionMessages( 'OnlineStatus' );
298292 $out->setSubtitle( wfMsgExt( 'onlinestatus-subtitle-' . $status, array( 'parse' ) ) );
299293
300294 return true;
@@ -310,7 +304,6 @@
311305 $arr = array();
312306 foreach( $urls as $key => $val ){
313307 if( $key == 'logout' ){
314 - wfLoadExtensionMessages( 'OnlineStatus' );
315308 $arr['status'] = array(
316309 'text' => wfMsgHtml( 'onlinestatus-tab' ),
317310 'href' => 'javascript:;',

Status & tagging log