X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FexportSites.php;h=b1e4fa943b96e33d8eaaf989f2dad353fbf19ae4;hb=124390e4c7dcfdab0df00ac5c4047a01298bfa25;hp=145c9249236952f7e6c80515414c415aa80838f5;hpb=8195fd3551c484cfe140fd54ac9c16c2d8c4bc4a;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/exportSites.php b/maintenance/exportSites.php index 145c924923..b1e4fa943b 100644 --- a/maintenance/exportSites.php +++ b/maintenance/exportSites.php @@ -15,7 +15,7 @@ require_once $basePath . '/maintenance/Maintenance.php'; class ExportSites extends Maintenance { public function __construct() { - $this->mDescription = 'Exports site definitions the sites table to XML file'; + $this->addDescription( 'Exports site definitions the sites table to XML file' ); $this->addArg( 'file', 'A file to write the XML to (see docs/sitelist.txt). ' . 'Use "php://stdout" to write to stdout.', true @@ -42,8 +42,8 @@ class ExportSites extends Maintenance { $exporter = new SiteExporter( $handle ); - $sites = SiteSQLStore::newInstance()->getSites( 'recache' ); - $exporter->exportSites( $sites ); + $siteLookup = \MediaWiki\MediaWikiServices::getInstance()->getSiteLookup(); + $exporter->exportSites( $siteLookup->getSites() ); fclose( $handle );