|
@@ 925-941 (lines=17) @@
|
| 922 |
|
foreach ( $coreData as $key => $item ) { |
| 923 |
|
$this->mergeItem( $key, $csData[$key], $item ); |
| 924 |
|
} |
| 925 |
|
} else { |
| 926 |
|
# Load the secondary localisation from the source file to |
| 927 |
|
# avoid infinite cycles on cyclic fallbacks |
| 928 |
|
$fbData = $this->readSourceFilesAndRegisterDeps( $csCode, $deps ); |
| 929 |
|
if ( $fbData !== false ) { |
| 930 |
|
# Only merge the keys that make sense to merge |
| 931 |
|
foreach ( self::$allKeys as $key ) { |
| 932 |
|
if ( !isset( $fbData[$key] ) ) { |
| 933 |
|
continue; |
| 934 |
|
} |
| 935 |
|
|
| 936 |
|
if ( is_null( $coreData[$key] ) || $this->isMergeableKey( $key ) ) { |
| 937 |
|
$this->mergeItem( $key, $csData[$key], $fbData[$key] ); |
| 938 |
|
} |
| 939 |
|
} |
| 940 |
|
} |
| 941 |
|
} |
| 942 |
|
|
| 943 |
|
# Allow extensions an opportunity to adjust the data for this |
| 944 |
|
# fallback |
|
@@ 948-960 (lines=13) @@
|
| 945 |
|
Hooks::run( 'LocalisationCacheRecacheFallback', [ $this, $csCode, &$csData ] ); |
| 946 |
|
|
| 947 |
|
# Merge the data for this fallback into the final array |
| 948 |
|
if ( $csCode === $code ) { |
| 949 |
|
$allData = $csData; |
| 950 |
|
} else { |
| 951 |
|
foreach ( self::$allKeys as $key ) { |
| 952 |
|
if ( !isset( $csData[$key] ) ) { |
| 953 |
|
continue; |
| 954 |
|
} |
| 955 |
|
|
| 956 |
|
if ( is_null( $allData[$key] ) || $this->isMergeableKey( $key ) ) { |
| 957 |
|
$this->mergeItem( $key, $allData[$key], $csData[$key] ); |
| 958 |
|
} |
| 959 |
|
} |
| 960 |
|
} |
| 961 |
|
} |
| 962 |
|
|
| 963 |
|
# Add cache dependencies for any referenced globals |