From: Aaron Schulz Date: Sun, 1 Mar 2009 20:04:52 +0000 (+0000) Subject: Log dump cleanup for WikiExporter::STREAM X-Git-Tag: 1.31.0-rc.0~42643 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=0e161fb937c806f8355222f3f752cfed907ffb71;p=lhc%2Fweb%2Fwiklou.git Log dump cleanup for WikiExporter::STREAM --- 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 {