X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FgetText.php;h=9c4bdfb84b755aa01213283606b4039dc66f8bb8;hb=9b2b027ba7bc922bb9150cad19c49feb0c892f9f;hp=3e2f8540108c0de4f605b84a8797a53c3ed45b26;hpb=a5819b67587d1b6ae0df8ebb703c8110c5cf0d73;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/getText.php b/maintenance/getText.php index 3e2f854010..9c4bdfb84b 100644 --- a/maintenance/getText.php +++ b/maintenance/getText.php @@ -23,7 +23,7 @@ * @ingroup Maintenance */ -require_once( __DIR__ . '/Maintenance.php' ); +require_once __DIR__ . '/Maintenance.php'; /** * Maintenance script that outputs page text to stdout. @@ -52,14 +52,14 @@ 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() ); } } $maintClass = "GetTextMaint"; -require_once( RUN_MAINTENANCE_IF_MAIN ); +require_once RUN_MAINTENANCE_IF_MAIN;