From 6677824a0c3dc90f32de52ee8f599a645d8a26f1 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 22 Mar 2006 21:55:07 +0000 Subject: [PATCH] Revert database-killing feature. --- includes/Export.php | 39 ++------------------------------------ includes/SpecialExport.php | 4 ---- 2 files changed, 2 insertions(+), 41 deletions(-) diff --git a/includes/Export.php b/includes/Export.php index 1e2ad7f7a5..dee2e044c4 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -40,10 +40,6 @@ define( 'MW_EXPORT_STUB', 1 ); * @subpackage SpecialPage */ class WikiExporter { - - var $list_authors = false ; # Return distinct author list (when not returning full history) - var $author_list = "" ; - /** * If using MW_EXPORT_STREAM to stream a large amount of data, * provide a database connection which is not managed by @@ -137,30 +133,6 @@ class WikiExporter { // -------------------- private implementation below -------------------- - # Generates the distinct list of authors of an article - # Not called by default (depends on $this->list_authors) - # Can be set by Special:Export when not exporting whole history - function do_list_authors ( $page , $revision , $cond ) { - $fname = "do_list_authors" ; - wfProfileIn( $fname ); - $this->author_list = ""; - $sql = "SELECT DISTINCT rev_user_text,rev_user FROM {$page},{$revision} WHERE page_id=rev_page AND " . $cond ; - $result = $this->db->query( $sql, $fname ); - $resultset = $this->db->resultObject( $result ); - while( $row = $resultset->fetchObject() ) { - $this->author_list .= "" . - "" . - htmlentities( $row->rev_user_text ) . - "" . - "" . - $row->rev_user . - "" . - ""; - } - wfProfileOut( $fname ); - $this->author_list .= ""; - } - function dumpFrom( $cond = '' ) { $fname = 'WikiExporter::dumpFrom'; wfProfileIn( $fname ); @@ -168,13 +140,10 @@ class WikiExporter { $page = $this->db->tableName( 'page' ); $revision = $this->db->tableName( 'revision' ); $text = $this->db->tableName( 'text' ); - + if( $this->history == MW_EXPORT_FULL ) { $join = 'page_id=rev_page'; } elseif( $this->history == MW_EXPORT_CURRENT ) { - if ( $this->list_authors && $cond != '' ) { // List authors, if so desired - $this->do_list_authors ( $page , $revision , $cond ); - } $join = 'page_id=rev_page AND page_latest=rev_id'; } else { wfProfileOut( $fname ); @@ -210,10 +179,6 @@ class WikiExporter { $result = $this->db->query( $sql, $fname ); $wrapper = $this->db->resultObject( $result ); $this->outputStream( $wrapper ); - - if ( $this->list_authors ) { - $this->outputStream( $wrapper ); - } if( $this->buffer == MW_EXPORT_STREAM ) { $this->db->bufferResults( $prev ); @@ -253,7 +218,7 @@ class WikiExporter { $this->sink->writeRevision( $row, $output ); } if( isset( $last ) ) { - $output = $this->author_list . $this->writer->closePage(); + $output = $this->writer->closePage(); $this->sink->writeClosePage( $output ); } $resultset->free(); diff --git a/includes/SpecialExport.php b/includes/SpecialExport.php index acbb836e95..fe9a1e343e 100644 --- a/includes/SpecialExport.php +++ b/includes/SpecialExport.php @@ -44,9 +44,6 @@ function wfSpecialExport( $page = '' ) { # Pre-check the 'current version only' box in the UI $curonly = true; } - - $list_authors = $wgRequest->getCheck( 'listauthors' ); - if ( !$curonly ) $list_authors = false ; if( $page != '' ) { $wgOut->disable(); @@ -56,7 +53,6 @@ function wfSpecialExport( $page = '' ) { $db =& wfGetDB( DB_SLAVE ); $history = $curonly ? MW_EXPORT_CURRENT : MW_EXPORT_FULL; $exporter = new WikiExporter( $db, $history ); - $exporter->list_authors = $list_authors ; $exporter->openStream(); $exporter->pagesByName( $pages ); $exporter->closeStream(); -- 2.20.1