r50670 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50669‎ | r50670 | r50671 >
Date:20:12, 16 May 2009
Author:ialex
Status:ok
Tags:
Comment:
* fix MessageCache::get()'s $isFullKey param: full key is "msg/lang" as in MediaWiki namespace, not "lang/msg"
* whitespaces tweaks
Modified paths:
  • /trunk/phase3/includes/MessageCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/MessageCache.php
@@ -500,7 +500,7 @@
501501 * functionality), or if it is a true boolean then
502502 * use the wikis content language (also as a
503503 * fallback).
504 - * @param bool $isFullKey Specifies whether $key is a two part key "lang/msg".
 504+ * @param bool $isFullKey Specifies whether $key is a two part key "msg/lang".
505505 */
506506 function get( $key, $useDB = true, $langcode = true, $isFullKey = false ) {
507507 global $wgContLanguageCode, $wgContLang;
@@ -522,13 +522,13 @@
523523 # Try the MediaWiki namespace
524524 if( !$this->mDisable && $useDB ) {
525525 $title = $wgContLang->ucfirst( $lckey );
526 - if(!$isFullKey && ($langcode != $wgContLanguageCode) ) {
 526+ if(!$isFullKey && ( $langcode != $wgContLanguageCode ) ) {
527527 $title .= '/' . $langcode;
528528 }
529529 $message = $this->getMsgFromNamespace( $title, $langcode );
530530 }
531 - if($message === false)
532 - wfRunHooks('MessageNotInMwNs', array(&$message,$lckey,$langcode,$isFullKey));
 531+ if( $message === false )
 532+ wfRunHooks( 'MessageNotInMwNs', array( &$message, $lckey, $langcode, $isFullKey ) );
533533
534534 # Try the extension array
535535 if ( $message === false && isset( $this->mExtensionMessages[$langcode][$lckey] ) ) {

Status & tagging log