X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=maintenance%2FimportTextFiles.php;h=e926cfd2b789ea4385175c9747dd2e0600599089;hb=d1c0589f6d17419991648f60dffaf8c762df69fc;hp=14d8420ce41d7bfa31703c7d9991042452b0c494;hpb=a7f35b785943ecf471095e79bc907aa5bbe228ca;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/importTextFiles.php b/maintenance/importTextFiles.php index 14d8420ce4..e926cfd2b7 100644 --- a/maintenance/importTextFiles.php +++ b/maintenance/importTextFiles.php @@ -32,7 +32,7 @@ require_once __DIR__ . '/Maintenance.php'; class ImportTextFiles extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Reads in text files and imports their content to pages of the wiki"; + $this->addDescription( 'Reads in text files and imports their content to pages of the wiki' ); $this->addOption( 'user', 'Username to which edits should be attributed. ' . 'Default: "Maintenance script"', false, true, 'u' ); $this->addOption( 'summary', 'Specify edit summary for the edits', false, true, 's' ); @@ -57,7 +57,7 @@ class ImportTextFiles extends Maintenance { // Get all the arguments. A loop is required since Maintenance doesn't // suppport an arbitrary number of arguments. - $files = array(); + $files = []; $i = 0; while ( $arg = $this->getArg( $i++ ) ) { if ( file_exists( $arg ) ) { @@ -71,7 +71,7 @@ class ImportTextFiles extends Maintenance { $this->output( "Importing $count pages...\n" ); if ( $userName === false ) { - $user = User::newSystemUser( 'Maintenance script', array( 'steal' => true ) ); + $user = User::newSystemUser( 'Maintenance script', [ 'steal' => true ] ); } else { $user = User::newFromName( $userName ); }