Merge "Gruntfile.js: Remove obsolete eslint omissions"
[lhc/web/wiklou.git] / maintenance / edit.php
index b67a957..4219ed0 100644 (file)
@@ -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 );
        }