* @return string
*/
public static function schemaVersion() {
- return "0.9";
+ return "0.10";
}
/**
if ( $this->buffer == WikiExporter::STREAM ) {
$prev = $this->db->bufferResults( false );
}
- $wrapper = null; // Assuring $wrapper is not undefined, if exception occurs early
+ $result = null; // Assuring $result is not undefined, if exception occurs early
try {
$result = $this->db->select( array( 'logging', 'user' ),
array( "{$logging}.*", 'user_name' ), // grab the user name
__METHOD__,
array( 'ORDER BY' => 'log_id', 'USE INDEX' => array( 'logging' => 'PRIMARY' ) )
);
- $wrapper = $this->db->resultObject( $result );
- $this->outputLogStream( $wrapper );
+ $this->outputLogStream( $result );
if ( $this->buffer == WikiExporter::STREAM ) {
$this->db->bufferResults( $prev );
}
// Freeing result
try {
- if ( $wrapper ) {
- $wrapper->free();
+ if ( $result ) {
+ $result->free();
}
} catch ( Exception $e2 ) {
// Already in panic mode -> ignoring $e2 as $e has
$prev = $this->db->bufferResults( false );
}
- $wrapper = null; // Assuring $wrapper is not undefined, if exception occurs early
+ $result = null; // Assuring $result is not undefined, if exception occurs early
try {
wfRunHooks( 'ModifyExportQuery',
array( $this->db, &$tables, &$cond, &$opts, &$join ) );
# Do the query!
$result = $this->db->select( $tables, '*', $cond, __METHOD__, $opts, $join );
- $wrapper = $this->db->resultObject( $result );
# Output dump results
- $this->outputPageStream( $wrapper );
+ $this->outputPageStream( $result );
if ( $this->buffer == WikiExporter::STREAM ) {
$this->db->bufferResults( $prev );
// Freeing result
try {
- if ( $wrapper ) {
- $wrapper->free();
+ if ( $result ) {
+ $result->free();
}
} catch ( Exception $e2 ) {
// Already in panic mode -> ignoring $e2 as $e has
}
/**
- * @param array $resultset
+ * @param ResultWrapper $resultset
*/
protected function outputLogStream( $resultset ) {
foreach ( $resultset as $row ) {
* @ingroup Dump
*/
class XmlDumpWriter {
- /**
- * Returns the export schema version.
- * @deprecated since 1.20; use WikiExporter::schemaVersion() instead
- * @return string
- */
- function schemaVersion() {
- wfDeprecated( __METHOD__, '1.20' );
- return WikiExporter::schemaVersion();
- }
-
/**
* Opens the XML output stream's root "<mediawiki>" element.
* This does not include an xml directive, so is safe to include
$content_format = $content_handler->getDefaultFormat();
}
+ $out .= " " . Xml::element( 'model', null, strval( $content_model ) ) . "\n";
+ $out .= " " . Xml::element( 'format', null, strval( $content_format ) ) . "\n";
+
$text = '';
if ( isset( $row->rev_deleted ) && ( $row->rev_deleted & Revision::DELETED_TEXT ) ) {
$out .= " " . Xml::element( 'text', array( 'deleted' => 'deleted' ) ) . "\n";
$out .= " <sha1/>\n";
}
- $out .= " " . Xml::element( 'model', null, strval( $content_model ) ) . "\n";
- $out .= " " . Xml::element( 'format', null, strval( $content_format ) ) . "\n";
-
wfRunHooks( 'XmlDumpWriterWriteRevision', array( &$this, &$out, $row, $text ) );
$out .= " </revision>\n";