X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FexportSites.php;h=2462eaf8fdce42d419ff3067e14de0a349f74ada;hb=1797b20c8e675d92594be2a6b0c2f319f11026b0;hp=157a3234bcb0225720041ca3896d81c0a99a75e2;hpb=ae69acacf567077b3f49d1fe6c3f3770e72a9093;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/exportSites.php b/maintenance/exportSites.php index 157a3234bc..2462eaf8fd 100644 --- a/maintenance/exportSites.php +++ b/maintenance/exportSites.php @@ -37,13 +37,13 @@ class ExportSites extends Maintenance { $handle = fopen( $file, 'w' ); if ( !$handle ) { - $this->error( "Failed to open $file for writing.\n", 1 ); + $this->fatalError( "Failed to open $file for writing.\n" ); } $exporter = new SiteExporter( $handle ); - $sites = SiteSQLStore::newInstance()->getSites( 'recache' ); - $exporter->exportSites( $sites ); + $siteLookup = \MediaWiki\MediaWikiServices::getInstance()->getSiteLookup(); + $exporter->exportSites( $siteLookup->getSites() ); fclose( $handle ); @@ -52,5 +52,5 @@ class ExportSites extends Maintenance { } -$maintClass = 'ExportSites'; +$maintClass = ExportSites::class; require_once RUN_MAINTENANCE_IF_MAIN;