X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FExport.php;h=dee0a864d4a9d5e49a20d44dda282f56822a9285;hb=b1a32ed130876b4e5d4357dd984430471805afa4;hp=48a814d322204b2f2f27183ee2b81d3e799c973a;hpb=523c6c0e41159c073b6b44dd550878f42cbc847e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Export.php b/includes/Export.php index 48a814d322..dee0a864d4 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -267,7 +267,7 @@ class WikiExporter { 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 @@ -275,8 +275,7 @@ class WikiExporter { __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 ); } @@ -286,8 +285,8 @@ class WikiExporter { // Freeing result try { - if ( $wrapper ) { - $wrapper->free(); + if ( $result ) { + $result->free(); } } catch ( Exception $e2 ) { // Already in panic mode -> ignoring $e2 as $e has @@ -377,16 +376,15 @@ class WikiExporter { $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 ); @@ -397,8 +395,8 @@ class WikiExporter { // Freeing result try { - if ( $wrapper ) { - $wrapper->free(); + if ( $result ) { + $result->free(); } } catch ( Exception $e2 ) { // Already in panic mode -> ignoring $e2 as $e has @@ -467,7 +465,7 @@ class WikiExporter { } /** - * @param array $resultset + * @param ResultWrapper $resultset */ protected function outputLogStream( $resultset ) { foreach ( $resultset as $row ) { @@ -481,16 +479,6 @@ class WikiExporter { * @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 "" element. * This does not include an xml directive, so is safe to include