X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=blobdiff_plain;f=includes%2Fcache%2Flocalisation%2FLocalisationCache.php;h=58a67adb8ee7ddd567358ae8d42056c21c7ff29f;hb=91a920fd85c34e64f47140ed82f2ac0913ed8033;hp=4b6362fb0be6f3fbc8ec8799da426d072b5e7f5c;hpb=dcdb8e463e3b2be121c61c91df13ea36d270a602;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/cache/localisation/LocalisationCache.php b/includes/cache/localisation/LocalisationCache.php index 4b6362fb0b..58a67adb8e 100644 --- a/includes/cache/localisation/LocalisationCache.php +++ b/includes/cache/localisation/LocalisationCache.php @@ -183,7 +183,6 @@ class LocalisationCache { private $mergeableKeys = null; /** - * Constructor. * For constructor parameters, see the documentation in DefaultSettings.php * for $wgLocalisationCacheConf. * @@ -212,23 +211,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 +310,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 ) ) {