From 0e161fb937c806f8355222f3f752cfed907ffb71 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 1 Mar 2009 20:04:52 +0000 Subject: [PATCH] Log dump cleanup for WikiExporter::STREAM --- includes/Export.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/includes/Export.php b/includes/Export.php index faa11f0076..f41cc450d3 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -180,19 +180,27 @@ class WikiExporter { # For logs dumps... if( $this->history & self::LOGS ) { + if( $this->buffer == WikiExporter::STREAM ) { + $prev = $this->db->bufferResults( false ); + } $where = array( 'user_id = log_user' ); # Hide private logs - $where[] = LogEventsList::getExcludeClause( $this->db ); + $hideLogs = LogEventsList::getExcludeClause( $this->db ); + if( $hideLogs ) $where[] = $hideLogs; + # Add on any caller specified conditions if( $cond ) $where[] = $cond; # Get logging table name for logging.* clause $logging = $this->db->tableName('logging'); $result = $this->db->select( array('logging','user'), array( "{$logging}.*", 'user_name' ), // grab the user name $where, - $fname, + __METHOD__, array( 'ORDER BY' => 'log_id', 'USE INDEX' => array('logging' => 'PRIMARY') ) ); $wrapper = $this->db->resultObject( $result ); + if( $this->buffer == WikiExporter::STREAM ) { + $this->db->bufferResults( $prev ); + } $this->outputLogStream( $wrapper ); # For page dumps... } else { -- 2.20.1