X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2Fedit.php;h=7e50e9e1b4d3edc655cd1e1f91d136d9e94df5a2;hp=fc83a91bab4bb6a3268362cb318d238020b35e6d;hb=86d7bd86fa08db2dbf3651a656d8238a34703c4f;hpb=920c06e42c307fcaea47d9b65e09303aded2d1c9 diff --git a/maintenance/edit.php b/maintenance/edit.php index fc83a91bab..7e50e9e1b4 100644 --- a/maintenance/edit.php +++ b/maintenance/edit.php @@ -54,12 +54,12 @@ 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 ); } if ( !$wgUser ) { - $this->error( "Invalid username", true ); + $this->fatalError( "Invalid username" ); } if ( $wgUser->isAnon() ) { $wgUser->addToDatabase(); @@ -67,13 +67,13 @@ class EditCLI extends Maintenance { $title = Title::newFromText( $this->getArg() ); if ( !$title ) { - $this->error( "Invalid title", true ); + $this->fatalError( "Invalid title" ); } if ( $this->hasOption( 'nocreate' ) && !$title->exists() ) { - $this->error( "Page does not exist", true ); + $this->fatalError( "Page does not exist" ); } elseif ( $this->hasOption( 'createonly' ) && $title->exists() ) { - $this->error( "Page already exists", true ); + $this->fatalError( "Page already exists" ); } $page = WikiPage::factory( $title ); @@ -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 ); }