From cd47443fcfb2ef677e27b35fab1c2749e9b3378f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Fri, 19 Aug 2011 09:02:35 +0000 Subject: [PATCH] Fu r94907 - also update localisation cache, which accesses the fallback variable directly Fixes bug 30456 --- includes/LocalisationCache.php | 35 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/includes/LocalisationCache.php b/includes/LocalisationCache.php index 8d8c03f872..b20db3298a 100644 --- a/includes/LocalisationCache.php +++ b/includes/LocalisationCache.php @@ -1,6 +1,6 @@ getItem( $coreData['fallback'], 'deps' ) ); - foreach ( self::$allKeys as $key ) { - if ( is_null( $coreData[$key] ) || $this->isMergeableKey( $key ) ) { - $fallbackValue = $this->getItem( $coreData['fallback'], $key ); - $this->mergeItem( $key, $coreData[$key], $fallbackValue ); + foreach ( $coreData['fallbackSequence'] as $fallback ) { + $deps = array_merge( $deps, $this->getItem( $fallback, 'deps' ) ); + foreach ( self::$allKeys as $key ) { + if ( is_null( $coreData[$key] ) || $this->isMergeableKey( $key ) ) { + $fallbackValue = $this->getItem( $fallback, $key ); + $this->mergeItem( $key, $coreData[$key], $fallbackValue ); + } } } - $fallbackSequence = $this->getItem( $coreData['fallback'], 'fallbackSequence' ); - array_unshift( $fallbackSequence, $coreData['fallback'] ); - $coreData['fallbackSequence'] = $fallbackSequence; - unset( $recursionGuard[$code] ); - } else { - $coreData['fallbackSequence'] = array(); + } $codeSequence = array_merge( array( $code ), $coreData['fallbackSequence'] ); -- 2.20.1