X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FgetText.php;h=21a183b6f547f73ae4034da3058911c320efc0df;hb=a166e509431ab2f002e3ae68ac3b01a4261a9b16;hp=c4b8cc9bffcd471975a62b4ae89e7bddf051af38;hpb=114e30955c803d13f37dbb23c8d0cf500fc43d06;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/getText.php b/maintenance/getText.php index c4b8cc9bff..21a183b6f5 100644 --- a/maintenance/getText.php +++ b/maintenance/getText.php @@ -33,7 +33,7 @@ require_once __DIR__ . '/Maintenance.php'; class GetTextMaint extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = 'Outputs page text to stdout'; + $this->addDescription( 'Outputs page text to stdout' ); $this->addOption( 'show-private', 'Show the text even if it\'s not available to the public' ); $this->addArg( 'title', 'Page title' ); } @@ -42,13 +42,13 @@ class GetTextMaint extends Maintenance { $titleText = $this->getArg( 0 ); $title = Title::newFromText( $titleText ); if ( !$title ) { - $this->error( "$titleText is not a valid title.\n", true ); + $this->fatalError( "$titleText is not a valid title.\n" ); } $rev = Revision::newFromTitle( $title ); if ( !$rev ) { $titleText = $title->getPrefixedText(); - $this->error( "Page $titleText does not exist.\n", true ); + $this->fatalError( "Page $titleText does not exist.\n" ); } $content = $rev->getContent( $this->hasOption( 'show-private' ) ? Revision::RAW @@ -56,7 +56,7 @@ class GetTextMaint extends Maintenance { if ( $content === false ) { $titleText = $title->getPrefixedText(); - $this->error( "Couldn't extract the text from $titleText.\n", true ); + $this->fatalError( "Couldn't extract the text from $titleText.\n" ); } $this->output( $content->serialize() ); }