*
* @since 1.25
*
- * @license GNU GPL v2+
+ * @license GPL-2.0-or-later
* @author Daniel Kinzler
*/
class ImportSites extends Maintenance {
public function execute() {
$file = $this->getArg( 0 );
- $importer = new SiteImporter( SiteSQLStore::newInstance() );
+ $siteStore = \MediaWiki\MediaWikiServices::getInstance()->getSiteStore();
+ $importer = new SiteImporter( $siteStore );
$importer->setExceptionCallback( [ $this, 'reportException' ] );
$importer->importFromFile( $file );
}
}
-$maintClass = 'ImportSites';
+$maintClass = ImportSites::class;
require_once RUN_MAINTENANCE_IF_MAIN;