summaryrefslogtreecommitdiff
path: root/maintenance/getText.php
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/getText.php')
-rw-r--r--maintenance/getText.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/maintenance/getText.php b/maintenance/getText.php
index 3e2f8540..9c4bdfb8 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;