X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fedit.php;h=4219ed05179b391cce6d4d9376f532704130d7e7;hb=e43c87efd8b7316cd75822e27746148de789817a;hp=b67a9571626f4540117d5459f7f9d1372102ad71;hpb=e36b72b84352b1718a311dc77df6fb0c97b198d1;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/edit.php b/maintenance/edit.php index b67a957162..4219ed0517 100644 --- a/maintenance/edit.php +++ b/maintenance/edit.php @@ -31,7 +31,7 @@ require_once __DIR__ . '/Maintenance.php'; class EditCLI extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Edit an article from the command line, text is from stdin"; + $this->addDescription( 'Edit an article from the command line, text is from stdin' ); $this->addOption( 'user', 'Username', false, true, 'u' ); $this->addOption( 'summary', 'Edit summary', false, true, 's' ); $this->addOption( 'minor', 'Minor edit', false, false, 'm' ); @@ -54,7 +54,7 @@ class EditCLI extends Maintenance { $noRC = $this->hasOption( 'no-rc' ); if ( $userName === false ) { - $wgUser = User::newSystemUser( 'Maintenance script', array( 'steal' => true ) ); + $wgUser = User::newSystemUser( 'Maintenance script', [ 'steal' => true ] ); } else { $wgUser = User::newFromName( $userName ); } @@ -97,7 +97,7 @@ class EditCLI extends Maintenance { $exit = 1; } if ( !$status->isGood() ) { - $this->output( $status->getWikiText() . "\n" ); + $this->output( $status->getWikiText( false, false, 'en' ) . "\n" ); } exit( $exit ); }