Pass correct store to rebuildLocalisationCache.php
[lhc/web/wiklou.git] / maintenance / rebuildLocalisationCache.php
index 23a2505..8a519e7 100644 (file)
@@ -62,7 +62,7 @@ class RebuildLocalisationCache extends Maintenance {
        }
 
        public function execute() {
-               global $wgLocalisationCacheConf;
+               global $wgLocalisationCacheConf, $wgCacheDirectory;
 
                $force = $this->hasOption( 'force' );
                $threads = $this->getOption( 'threads', 1 );
@@ -92,12 +92,13 @@ class RebuildLocalisationCache extends Maintenance {
                                $conf,
                                MediaWikiServices::getInstance()->getMainConfig()
                        ),
-                       new LCStoreDB( [] ),
+                       LocalisationCache::getStoreFromConf( $conf, $wgCacheDirectory ),
                        LoggerFactory::getInstance( 'localisation' ),
                        [ function () {
                                MediaWikiServices::getInstance()->getResourceLoader()
                                        ->getMessageBlobStore()->clear();
-                       } ]
+                       } ],
+                       MediaWikiServices::getInstance()->getLanguageNameUtils()
                );
 
                $allCodes = array_keys( Language::fetchLanguageNames( null, 'mwfile' ) );