X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FrebuildSitesCache.php;h=2bc751081ac1eafea5fcb322c85bbef685ff34b6;hb=8732532d47866f75d9d145d877e3e41bbd3a29d2;hp=862a983d4485b25b0618eee459c04a6a503536dc;hpb=30e009794bacc2e3138c372e6ddf876dca2d4a9c;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/rebuildSitesCache.php b/maintenance/rebuildSitesCache.php index 862a983d44..2bc751081a 100644 --- a/maintenance/rebuildSitesCache.php +++ b/maintenance/rebuildSitesCache.php @@ -23,7 +23,7 @@ require_once __DIR__ . '/Maintenance.php'; /** - * Maintenance script to dump the SiteStore as a static json file. + * Maintenance script to dump a SiteStore as a static json file. * * @ingroup Maintenance */ @@ -32,17 +32,17 @@ class RebuildSitesCache extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Dumps site store as json"; + $this->mDescription = "Cache sites as json for file-based lookup."; $this->addOption( 'file', 'File to output the json to', false, true ); } public function execute() { - $siteListFileCacheBuilder = new SiteListFileCacheBuilder( - SiteSQLStore::newInstance(), + $sitesCacheFileBuilder = new SitesCacheFileBuilder( + new DBSiteStore(), $this->getCacheFile() ); - $siteListFileCacheBuilder->build(); + $sitesCacheFileBuilder->build(); } /** @@ -55,7 +55,7 @@ class RebuildSitesCache extends Maintenance { $jsonFile = $this->getConfig()->get( 'SitesCacheFile' ); if ( $jsonFile === false ) { - $this->error( 'Error: No sites cache file is set in configuration.', 1 ); + $this->error( 'Error: No file set in configuration for SitesCacheFile.', 1 ); } }