class FetchText extends Maintenance {
public function __construct() {
parent::__construct();
- $this->mDescription = "Fetch the revision text from an old_id";
+ $this->mDescription = "Fetch the raw revision blob from an old_id.";
+ $this->mDescription .= "\nNOTE: Export transformations are NOT applied. This is left to backupTextPass.php";
}
/**
* returns a string containing the following in order:
- * textid
- * \n
- * length of text (-1 on error = failure to retrieve/unserialize/gunzip/etc)
- * \n
- * text (may be empty)
+ * textid
+ * \n
+ * length of text (-1 on error = failure to retrieve/unserialize/gunzip/etc)
+ * \n
+ * text (may be empty)
*
* note that that the text string itself is *not* followed by newline
*/
if ( $text === false ) {
# actual error, not zero-length text
$textLen = "-1";
- }
- else {
+ } else {
$textLen = strlen( $text );
}
$this->output( $textId . "\n" . $textLen . "\n" . $text );
if ( $text === false ) {
return false;
}
+
return $text;
}
}