X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FgetText.php;h=f6adfe2be1e7f0b78504dc9735e298a5b3dda9af;hb=1162a32ef22973ba3c92b7b91c146deef217be10;hp=34558b66f9465c45858ef7b7f113bb346eaf375e;hpb=d266f40a2f828810d0249de1fdd7107a026066d4;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/getText.php b/maintenance/getText.php index 34558b66f9..f6adfe2be1 100644 --- a/maintenance/getText.php +++ b/maintenance/getText.php @@ -23,7 +23,7 @@ * @ingroup Maintenance */ -require_once( dirname( __FILE__ ) . '/Maintenance.php' ); +require_once( __DIR__ . '/Maintenance.php' ); /** * Maintenance script that outputs page text to stdout. @@ -52,12 +52,12 @@ class GetTextMaint extends Maintenance { $titleText = $title->getPrefixedText(); $this->error( "Page $titleText does not exist.\n", true ); } - $text = $rev->getText( $this->hasOption( 'show-private' ) ? Revision::RAW : Revision::FOR_PUBLIC ); - if ( $text === false ) { + $content = $rev->getContent( $this->hasOption( 'show-private' ) ? Revision::RAW : Revision::FOR_PUBLIC ); + if ( $content === false ) { $titleText = $title->getPrefixedText(); $this->error( "Couldn't extract the text from $titleText.\n", true ); } - $this->output( $text ); + $this->output( $content->serialize() ); } }