X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fcache%2Flocalisation%2FLCStoreStaticArray.php;h=53893bdbe43139961a76119ac08b155c95b6c287;hb=54c93f1d384cd5accd2db2ebbb911e4d627c2980;hp=d3504a8fad427f4858a1b7e968ceee528971ebee;hpb=b6d03f5a1548e88f2e3932570beca8a3393ddc4f;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/cache/localisation/LCStoreStaticArray.php b/includes/cache/localisation/LCStoreStaticArray.php index d3504a8fad..53893bdbe4 100644 --- a/includes/cache/localisation/LCStoreStaticArray.php +++ b/includes/cache/localisation/LCStoreStaticArray.php @@ -39,9 +39,7 @@ class LCStoreStaticArray implements LCStore { private $directory; public function __construct( $conf = [] ) { - global $wgCacheDirectory; - - $this->directory = $conf['directory'] ?? $wgCacheDirectory; + $this->directory = $conf['directory']; } public function startWrite( $code ) { @@ -123,6 +121,8 @@ class LCStoreStaticArray implements LCStore { 'Generated by LCStoreStaticArray.php -- do not edit!' ); file_put_contents( $this->fname, $out ); + // Release the data to manage the memory in rebuildLocalisationCache + unset( $this->data[$this->currentLang] ); $this->currentLang = null; $this->fname = null; }