r35478 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r35477‎ | r35478 | r35479 >
Date:12:17, 28 May 2008
Author:ialex
Status:old
Tags:
Comment:
E_NOTICE: undefined variable $code in MessageCache::saveToCaches()
Modified paths:
  • /trunk/phase3/includes/MessageCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/MessageCache.php
@@ -264,7 +264,7 @@
265265 $success = $this->setCache( $cache );
266266 if ( $success ) {
267267 $where[] = 'got from global cache';
268 - $this->saveToCaches( $cache, $cacheKey, false );
 268+ $this->saveToCaches( $cache, $cacheKey, false, $code );
269269 }
270270 wfProfileOut( __METHOD__ . '-fromcache' );
271271 }
@@ -283,7 +283,7 @@
284284 $success = $this->setCache( $cache );
285285 wfProfileOut( __METHOD__ . '-load' );
286286 if ( $success ) {
287 - $this->saveToCaches( $cache, $cacheKey );
 287+ $this->saveToCaches( $cache, $cacheKey, true, $code );
288288 }
289289 $this->unlock($cacheKey);
290290 }
@@ -413,7 +413,7 @@
414414 $success = $this->setCache( $cache, $cacheKey );
415415 if ( $success ) {
416416 # And then all caches
417 - $this->saveToCaches( $cache, $cacheKey );
 417+ $this->saveToCaches( $cache, $cacheKey, true, $code );
418418 }
419419 }
420420 $this->unlock($cacheKey);
@@ -430,9 +430,10 @@
431431 * @param $cache Array: cached messages with a version.
432432 * @param $cacheKey String: Identifier for the cache.
433433 * @param $memc Bool: Wether to update or not memcache.
 434+ * @param $code String: Language code.
434435 * @return False on somekind of error.
435436 */
436 - protected function saveToCaches( $cache, $cacheKey, $memc = true ) {
 437+ protected function saveToCaches( $cache, $cacheKey, $memc = true, $code = false ) {
437438 wfProfileIn( __METHOD__ );
438439 global $wgLocalMessageCache, $wgLocalMessageCacheSerialized;
439440

Follow-up revisions

RevisionCommit summaryAuthorDate
r35667Revert r35478, r35264, r35262: $wgPerLanguageCaching feature. Bug found with ...tstarling03:27, 1 June 2008

Status & tagging log