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=90b3de1ac1b96326f4ccf208585badc0861fd882;hpb=41f1ce0d35b929d480ce87605a3234c187e44fd2;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/cache/localisation/LocalisationCache.php b/includes/cache/localisation/LocalisationCache.php index 90b3de1ac1..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']; }