X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FexportSites.php;h=2462eaf8fdce42d419ff3067e14de0a349f74ada;hb=5e3c21a7003a4fc8d4b8c327530421330c3331b0;hp=157a3234bcb0225720041ca3896d81c0a99a75e2;hpb=fb25d9fe77207c86d3f99934c74d5a0fa96ef0a2;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;