r33937 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r33936‎ | r33937 | r33938 >
Date:14:49, 27 April 2008
Author:nikerabbit
Status:old
Tags:
Comment:
* Fix the previous commit
Modified paths:
  • /trunk/phase3/languages/Language.php (modified) (history)

Diff [purge]

Index: trunk/phase3/languages/Language.php
@@ -2148,7 +2148,7 @@
21492149 self::$mLocalisationCache[$code] = $cache;
21502150 if ( !$disableCache ) {
21512151 $wgMemc->set( $memcKey, $cache );
2152 - $wgMemc->set( $fbMemcKey, $cache['fallback'] );
 2152+ $wgMemc->set( $fbMemcKey, (string) $cache['fallback'] );
21532153 }
21542154
21552155 wfProfileOut( __METHOD__ );
@@ -2183,17 +2183,18 @@
21842184 */
21852185 static function getFallbackFor( $code ) {
21862186 global $wgMemc;
2187 - $memcKey = wfMemcKey('fallback', $code );
 2187+ $memcKey = wfMemcKey( 'fallback', $code );
21882188 $fbcode = $wgMemc->get( $memcKey );
21892189
2190 - if ( $fbcode !== null ) {
2191 - wfDebug( __METHOD__ . ": got fallback for $code from memc: $fbcode\n" );
 2190+ if ( $fbcode !== false ) {
 2191+ wfDebug( __METHOD__ . ": got fallback for $code from memc: '$fbcode'\n" );
 2192+ if ( $fbcode === '' ) $fbcode = false;
21922193 return $fbcode;
21932194 }
21942195
21952196 self::loadLocalisation( $code );
21962197 $fbcode = self::$mLocalisationCache[$code]['fallback'];
2197 - $wgMemc->set( $memcKey, $fbcode );
 2198+ $wgMemc->set( $memcKey, (string) $fbcode );
21982199 return $fbcode;
21992200 }
22002201

Follow-up revisions

RevisionCommit summaryAuthorDate
r34126Partially reverting r33937, the localisation message fallback for extensions ...shinjiman15:36, 2 May 2008

Status & tagging log