X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FimportSites.php;h=daec7b62140032c1bd85e4e4f32fd9df09f91b7c;hb=b5906606e1aa1a795231fb813b766818b1dd6c25;hp=c5c00aa24d64be2967d4b8cf8eafe795098c5cba;hpb=6505e5f278aae664f78fb8f876c10902d2195231;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/importSites.php b/maintenance/importSites.php index c5c00aa24d..daec7b6214 100644 --- a/maintenance/importSites.php +++ b/maintenance/importSites.php @@ -15,7 +15,7 @@ require_once $basePath . '/maintenance/Maintenance.php'; class ImportSites extends Maintenance { public function __construct() { - $this->mDescription = 'Imports site definitions from XML into the sites table.'; + $this->addDescription( 'Imports site definitions from XML into the sites table.' ); $this->addArg( 'file', 'An XML file containing site definitions (see docs/sitelist.txt). ' . 'Use "php://stdin" to read from stdin.', true @@ -31,7 +31,7 @@ class ImportSites extends Maintenance { $file = $this->getArg( 0 ); $importer = new SiteImporter( SiteSQLStore::newInstance() ); - $importer->setExceptionCallback( array( $this, 'reportException' ) ); + $importer->setExceptionCallback( [ $this, 'reportException' ] ); $importer->importFromFile( $file );