X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fcache%2Flocalisation%2FLocalisationCache.php;h=d499340d0e5cdcb5ce91a6b2e156cf06bb364940;hb=424251a2cb5842727756d96f877c787c443ea056;hp=4b6362fb0be6f3fbc8ec8799da426d072b5e7f5c;hpb=86448ece43db70f21d591b7d0ce52447664a2600;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/cache/localisation/LocalisationCache.php b/includes/cache/localisation/LocalisationCache.php index 4b6362fb0b..d499340d0e 100644 --- a/includes/cache/localisation/LocalisationCache.php +++ b/includes/cache/localisation/LocalisationCache.php @@ -212,23 +212,21 @@ class LocalisationCache { case 'detect': if ( !empty( $conf['storeDirectory'] ) ) { $storeClass = 'LCStoreCDB'; + } elseif ( $wgCacheDirectory ) { + $storeConf['directory'] = $wgCacheDirectory; + $storeClass = 'LCStoreCDB'; } else { - $cacheDir = $wgCacheDirectory ?: wfTempDir(); - if ( $cacheDir ) { - $storeConf['directory'] = $cacheDir; - $storeClass = 'LCStoreCDB'; - } else { - $storeClass = 'LCStoreDB'; - } + $storeClass = 'LCStoreDB'; } break; default: throw new MWException( - 'Please set $wgLocalisationCacheConf[\'store\'] to something sensible.' ); + 'Please set $wgLocalisationCacheConf[\'store\'] to something sensible.' + ); } } - wfDebugLog( 'caches', get_class( $this ) . ": using store $storeClass" ); + wfDebugLog( 'caches', static::class . ": using store $storeClass" ); if ( !empty( $conf['storeDirectory'] ) ) { $storeConf['directory'] = $conf['storeDirectory']; } @@ -313,7 +311,7 @@ class LocalisationCache { * array. * @param string $code * @param string $key - * @return bool|null|string + * @return bool|null|string|string[] */ public function getSubitemList( $code, $key ) { if ( in_array( $key, self::$splitKeys ) ) {