Merge "Warn if stateful ParserOutput transforms are used"
[lhc/web/wiklou.git] / maintenance / exportSites.php
index 157a323..2462eaf 100644 (file)
@@ -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;