* is thrown.
*
* @param string $id The revision id to get the text for
- * @param string|bool|null $model The content model used to determine applicable export transformations.
- * If $model is null, it will be determined from the database.
+ * @param string|bool|null $model The content model used to determine
+ * applicable export transformations.
+ * If $model is null, it will be determined from the database.
* @param string|null $format The content format used when applying export transformations.
*
* @throws MWException
}
private function getTextSpawned( $id ) {
- wfSuppressWarnings();
+ MediaWiki\suppressWarnings();
if ( !$this->spawnProc ) {
// First time?
$this->openSpawn();
}
$text = $this->getTextSpawnedOnce( $id );
- wfRestoreWarnings();
+ MediaWiki\restoreWarnings();
return $text;
}
$this->progress( "Spawning database subprocess: $cmd" );
$this->spawnProc = proc_open( $cmd, $spec, $pipes );
if ( !$this->spawnProc ) {
- // shit
$this->progress( "Subprocess spawn failed." );
return false;
}
private function closeSpawn() {
- wfSuppressWarnings();
+ MediaWiki\suppressWarnings();
if ( $this->spawnRead ) {
fclose( $this->spawnRead );
}
pclose( $this->spawnProc );
}
$this->spawnProc = false;
- wfRestoreWarnings();
+ MediaWiki\restoreWarnings();
}
private function getTextSpawnedOnce( $id ) {
} elseif ( $this->state == "page" ) {
$this->thisPage .= $data;
}
- }
- elseif ( $this->lastName == "model" ) {
+ } elseif ( $this->lastName == "model" ) {
$this->thisRevModel .= $data;
- }
- elseif ( $this->lastName == "format" ) {
+ } elseif ( $this->lastName == "format" ) {
$this->thisRevFormat .= $data;
}