2005-10-16 17:33:41 +00:00
|
|
|
<?php
|
|
|
|
|
/**
|
2010-09-05 13:15:48 +00:00
|
|
|
* Base classes for database dumpers
|
|
|
|
|
*
|
|
|
|
|
* Copyright © 2005 Brion Vibber <brion@pobox.com>
|
2005-10-16 17:33:41 +00:00
|
|
|
* http://www.mediawiki.org/
|
2006-01-07 13:09:30 +00:00
|
|
|
*
|
2005-10-16 17:33:41 +00:00
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
2006-01-07 13:09:30 +00:00
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
2005-10-16 17:33:41 +00:00
|
|
|
* (at your option) any later version.
|
2006-01-07 13:09:30 +00:00
|
|
|
*
|
2005-10-16 17:33:41 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
2006-01-07 13:09:30 +00:00
|
|
|
*
|
2005-10-16 17:33:41 +00:00
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
2006-04-05 07:43:17 +00:00
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2005-10-16 17:33:41 +00:00
|
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
|
|
|
*
|
WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>
Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage
One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
|
|
|
* @file
|
|
|
|
|
* @ingroup Dump Maintenance
|
2005-10-16 17:33:41 +00:00
|
|
|
*/
|
|
|
|
|
|
WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>
Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage
One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
|
|
|
/**
|
|
|
|
|
* @ingroup Dump Maintenance
|
|
|
|
|
*/
|
2006-06-27 04:42:53 +00:00
|
|
|
class DumpDBZip2Output extends DumpPipeOutput {
|
|
|
|
|
function DumpDBZip2Output( $file ) {
|
2010-09-22 13:54:53 +00:00
|
|
|
parent::__construct( "dbzip2", $file );
|
2006-06-27 04:42:53 +00:00
|
|
|
}
|
|
|
|
|
}
|
2005-10-16 17:33:41 +00:00
|
|
|
|
WARNING: HUGE COMMIT
Doxygen documentation update:
* Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group.
* Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file.
* Removed some empty comments
* Removed some ?>
Added following groups:
* ExternalStorage
* JobQueue
* MaintenanceLanguage
One more thing: there are still a lot of warnings when generating the doc.
2008-05-20 17:13:28 +00:00
|
|
|
/**
|
|
|
|
|
* @ingroup Dump Maintenance
|
|
|
|
|
*/
|
2005-10-16 17:33:41 +00:00
|
|
|
class BackupDumper {
|
|
|
|
|
var $reportingInterval = 100;
|
|
|
|
|
var $reporting = true;
|
|
|
|
|
var $pageCount = 0;
|
|
|
|
|
var $revCount = 0;
|
|
|
|
|
var $server = null; // use default
|
|
|
|
|
var $pages = null; // all pages
|
|
|
|
|
var $skipHeader = false; // don't output <mediawiki> and <siteinfo>
|
|
|
|
|
var $skipFooter = false; // don't output </mediawiki>
|
|
|
|
|
var $startId = 0;
|
|
|
|
|
var $endId = 0;
|
|
|
|
|
var $sink = null; // Output filters
|
|
|
|
|
var $stubText = false; // include rev_text_id instead of text; for 2-pass dump
|
2008-03-04 02:03:52 +00:00
|
|
|
var $dumpUploads = false;
|
2011-04-30 21:35:09 +00:00
|
|
|
var $dumpUploadFileContents = false;
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2005-10-16 17:33:41 +00:00
|
|
|
function BackupDumper( $args ) {
|
|
|
|
|
$this->stderr = fopen( "php://stderr", "wt" );
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2005-12-14 20:56:43 +00:00
|
|
|
// Built-in output and filter plugins
|
|
|
|
|
$this->registerOutput( 'file', 'DumpFileOutput' );
|
|
|
|
|
$this->registerOutput( 'gzip', 'DumpGZipOutput' );
|
|
|
|
|
$this->registerOutput( 'bzip2', 'DumpBZip2Output' );
|
2006-06-27 04:42:53 +00:00
|
|
|
$this->registerOutput( 'dbzip2', 'DumpDBZip2Output' );
|
2005-12-14 20:56:43 +00:00
|
|
|
$this->registerOutput( '7zip', 'Dump7ZipOutput' );
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2005-12-14 20:56:43 +00:00
|
|
|
$this->registerFilter( 'latest', 'DumpLatestFilter' );
|
|
|
|
|
$this->registerFilter( 'notalk', 'DumpNotalkFilter' );
|
|
|
|
|
$this->registerFilter( 'namespace', 'DumpNamespaceFilter' );
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2005-10-16 17:33:41 +00:00
|
|
|
$this->sink = $this->processArgs( $args );
|
|
|
|
|
}
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2005-12-14 20:56:43 +00:00
|
|
|
/**
|
2010-03-03 21:28:03 +00:00
|
|
|
* @param $name String
|
|
|
|
|
* @param $class String: name of output filter plugin class
|
2005-12-14 20:56:43 +00:00
|
|
|
*/
|
|
|
|
|
function registerOutput( $name, $class ) {
|
|
|
|
|
$this->outputTypes[$name] = $class;
|
|
|
|
|
}
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2005-12-14 20:56:43 +00:00
|
|
|
/**
|
2010-03-03 21:28:03 +00:00
|
|
|
* @param $name String
|
|
|
|
|
* @param $class String: name of filter plugin class
|
2005-12-14 20:56:43 +00:00
|
|
|
*/
|
|
|
|
|
function registerFilter( $name, $class ) {
|
|
|
|
|
$this->filterTypes[$name] = $class;
|
|
|
|
|
}
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2005-12-14 20:56:43 +00:00
|
|
|
/**
|
|
|
|
|
* Load a plugin and register it
|
2010-03-03 21:28:03 +00:00
|
|
|
*
|
|
|
|
|
* @param $class String: name of plugin class; must have a static 'register'
|
|
|
|
|
* method that takes a BackupDumper as a parameter.
|
|
|
|
|
* @param $file String: full or relative path to the PHP file to load, or empty
|
2005-12-14 20:56:43 +00:00
|
|
|
*/
|
|
|
|
|
function loadPlugin( $class, $file ) {
|
2010-05-22 16:50:39 +00:00
|
|
|
if ( $file != '' ) {
|
2005-12-14 20:56:43 +00:00
|
|
|
require_once( $file );
|
|
|
|
|
}
|
|
|
|
|
$register = array( $class, 'register' );
|
|
|
|
|
call_user_func_array( $register, array( &$this ) );
|
|
|
|
|
}
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2005-10-16 17:33:41 +00:00
|
|
|
/**
|
2010-03-03 21:28:03 +00:00
|
|
|
* @param $args Array
|
|
|
|
|
* @return Array
|
2005-10-16 17:33:41 +00:00
|
|
|
*/
|
|
|
|
|
function processArgs( $args ) {
|
|
|
|
|
$sink = null;
|
|
|
|
|
$sinks = array();
|
2010-05-22 16:50:39 +00:00
|
|
|
foreach ( $args as $arg ) {
|
2007-01-12 05:50:03 +00:00
|
|
|
$matches = array();
|
2010-05-22 16:50:39 +00:00
|
|
|
if ( preg_match( '/^--(.+?)(?:=(.+?)(?::(.+?))?)?$/', $arg, $matches ) ) {
|
2007-01-12 05:50:03 +00:00
|
|
|
@list( /* $full */ , $opt, $val, $param ) = $matches;
|
2005-10-16 17:33:41 +00:00
|
|
|
switch( $opt ) {
|
2005-12-14 20:56:43 +00:00
|
|
|
case "plugin":
|
|
|
|
|
$this->loadPlugin( $val, $param );
|
|
|
|
|
break;
|
2005-10-16 17:33:41 +00:00
|
|
|
case "output":
|
2010-05-22 16:50:39 +00:00
|
|
|
if ( !is_null( $sink ) ) {
|
2005-10-16 17:33:41 +00:00
|
|
|
$sinks[] = $sink;
|
|
|
|
|
}
|
2010-05-22 16:50:39 +00:00
|
|
|
if ( !isset( $this->outputTypes[$val] ) ) {
|
2006-01-14 02:49:43 +00:00
|
|
|
wfDie( "Unrecognized output sink type '$val'\n" );
|
2005-10-16 17:33:41 +00:00
|
|
|
}
|
2005-12-14 20:56:43 +00:00
|
|
|
$type = $this->outputTypes[$val];
|
2005-10-16 17:33:41 +00:00
|
|
|
$sink = new $type( $param );
|
|
|
|
|
break;
|
|
|
|
|
case "filter":
|
2010-05-22 16:50:39 +00:00
|
|
|
if ( is_null( $sink ) ) {
|
2005-10-16 17:33:41 +00:00
|
|
|
$sink = new DumpOutput();
|
|
|
|
|
}
|
2010-05-22 16:50:39 +00:00
|
|
|
if ( !isset( $this->filterTypes[$val] ) ) {
|
2006-01-14 02:49:43 +00:00
|
|
|
wfDie( "Unrecognized filter type '$val'\n" );
|
2005-10-16 17:33:41 +00:00
|
|
|
}
|
2005-12-14 20:56:43 +00:00
|
|
|
$type = $this->filterTypes[$val];
|
2005-10-16 17:33:41 +00:00
|
|
|
$filter = new $type( $sink, $param );
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2005-10-16 17:33:41 +00:00
|
|
|
// references are lame in php...
|
|
|
|
|
unset( $sink );
|
|
|
|
|
$sink = $filter;
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2006-02-19 23:00:00 +00:00
|
|
|
break;
|
|
|
|
|
case "report":
|
|
|
|
|
$this->reportingInterval = intval( $val );
|
|
|
|
|
break;
|
|
|
|
|
case "server":
|
|
|
|
|
$this->server = $val;
|
2005-10-16 17:33:41 +00:00
|
|
|
break;
|
2006-05-10 00:16:32 +00:00
|
|
|
case "force-normal":
|
2010-05-22 16:50:39 +00:00
|
|
|
if ( !function_exists( 'utf8_normalize' ) ) {
|
2010-06-14 18:09:19 +00:00
|
|
|
wfDl( "php_utfnormal.so" );
|
2010-05-22 16:50:39 +00:00
|
|
|
if ( !function_exists( 'utf8_normalize' ) ) {
|
2006-05-10 00:16:32 +00:00
|
|
|
wfDie( "Failed to load UTF-8 normalization extension. " .
|
|
|
|
|
"Install or remove --force-normal parameter to use slower code.\n" );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
2005-10-16 17:33:41 +00:00
|
|
|
default:
|
|
|
|
|
$this->processOption( $opt, $val, $param );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2010-05-22 16:50:39 +00:00
|
|
|
if ( is_null( $sink ) ) {
|
2005-10-16 17:33:41 +00:00
|
|
|
$sink = new DumpOutput();
|
|
|
|
|
}
|
|
|
|
|
$sinks[] = $sink;
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2010-05-22 16:50:39 +00:00
|
|
|
if ( count( $sinks ) > 1 ) {
|
2005-10-16 17:33:41 +00:00
|
|
|
return new DumpMultiWriter( $sinks );
|
|
|
|
|
} else {
|
|
|
|
|
return $sink;
|
|
|
|
|
}
|
|
|
|
|
}
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2005-10-16 17:33:41 +00:00
|
|
|
function processOption( $opt, $val, $param ) {
|
|
|
|
|
// extension point for subclasses to add options
|
|
|
|
|
}
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2008-09-18 00:02:57 +00:00
|
|
|
function dump( $history, $text = WikiExporter::TEXT ) {
|
2005-10-16 17:33:41 +00:00
|
|
|
# Notice messages will foul up your XML output even if they're
|
|
|
|
|
# relatively harmless.
|
2010-05-22 16:50:39 +00:00
|
|
|
if ( ini_get( 'display_errors' ) )
|
2007-12-06 21:07:49 +00:00
|
|
|
ini_set( 'display_errors', 'stderr' );
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2006-01-26 08:06:05 +00:00
|
|
|
$this->initProgress( $history );
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2007-03-09 15:26:41 +00:00
|
|
|
$db = $this->backupDb();
|
2006-11-04 15:27:55 +00:00
|
|
|
$exporter = new WikiExporter( $db, $history, WikiExporter::STREAM, $text );
|
2008-03-04 02:03:52 +00:00
|
|
|
$exporter->dumpUploads = $this->dumpUploads;
|
2011-04-30 21:35:09 +00:00
|
|
|
$exporter->dumpUploadFileContents = $this->dumpUploadFileContents;
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2005-10-16 17:33:41 +00:00
|
|
|
$wrapper = new ExportProgressFilter( $this->sink, $this );
|
|
|
|
|
$exporter->setOutputSink( $wrapper );
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2010-05-22 16:50:39 +00:00
|
|
|
if ( !$this->skipHeader )
|
2005-10-16 17:33:41 +00:00
|
|
|
$exporter->openStream();
|
2008-09-18 00:02:57 +00:00
|
|
|
# Log item dumps: all or by range
|
2010-05-22 16:50:39 +00:00
|
|
|
if ( $history & WikiExporter::LOGS ) {
|
|
|
|
|
if ( $this->startId || $this->endId ) {
|
2008-09-18 00:02:57 +00:00
|
|
|
$exporter->logsByRange( $this->startId, $this->endId );
|
|
|
|
|
} else {
|
|
|
|
|
$exporter->allLogs();
|
|
|
|
|
}
|
|
|
|
|
# Page dumps: all or by page ID range
|
2010-05-22 16:50:39 +00:00
|
|
|
} else if ( is_null( $this->pages ) ) {
|
|
|
|
|
if ( $this->startId || $this->endId ) {
|
2005-10-16 17:33:41 +00:00
|
|
|
$exporter->pagesByRange( $this->startId, $this->endId );
|
|
|
|
|
} else {
|
|
|
|
|
$exporter->allPages();
|
|
|
|
|
}
|
2008-09-18 00:02:57 +00:00
|
|
|
# Dump of specific pages
|
2005-10-16 17:33:41 +00:00
|
|
|
} else {
|
|
|
|
|
$exporter->pagesByName( $this->pages );
|
|
|
|
|
}
|
|
|
|
|
|
2010-05-22 16:50:39 +00:00
|
|
|
if ( !$this->skipFooter )
|
2005-10-16 17:33:41 +00:00
|
|
|
$exporter->closeStream();
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2005-10-16 17:33:41 +00:00
|
|
|
$this->report( true );
|
|
|
|
|
}
|
2010-12-04 03:20:14 +00:00
|
|
|
|
2006-01-26 08:06:05 +00:00
|
|
|
/**
|
|
|
|
|
* Initialise starting time and maximum revision count.
|
|
|
|
|
* We'll make ETA calculations based an progress, assuming relatively
|
|
|
|
|
* constant per-revision rate.
|
2010-03-03 21:28:03 +00:00
|
|
|
* @param $history Integer: WikiExporter::CURRENT or WikiExporter::FULL
|
2006-01-26 08:06:05 +00:00
|
|
|
*/
|
2006-10-11 17:58:42 +00:00
|
|
|
function initProgress( $history = WikiExporter::FULL ) {
|
2010-05-22 16:50:39 +00:00
|
|
|
$table = ( $history == WikiExporter::CURRENT ) ? 'page' : 'revision';
|
|
|
|
|
$field = ( $history == WikiExporter::CURRENT ) ? 'page_id' : 'rev_id';
|
2010-12-04 03:20:14 +00:00
|
|
|
|
2007-01-22 23:50:42 +00:00
|
|
|
$dbr = wfGetDB( DB_SLAVE );
|
2010-12-03 10:08:47 +00:00
|
|
|
$this->maxCount = $dbr->selectField( $table, "MAX($field)", '', __METHOD__ );
|
2006-01-26 08:06:05 +00:00
|
|
|
$this->startTime = wfTime();
|
|
|
|
|
}
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2009-09-14 22:32:30 +00:00
|
|
|
/**
|
2010-03-03 21:28:03 +00:00
|
|
|
* @todo Fixme: the --server parameter is currently not respected, as it
|
|
|
|
|
* doesn't seem terribly easy to ask the load balancer for a particular
|
|
|
|
|
* connection by name.
|
2009-09-14 22:32:30 +00:00
|
|
|
*/
|
2007-03-09 15:26:41 +00:00
|
|
|
function backupDb() {
|
2009-09-14 22:32:30 +00:00
|
|
|
$this->lb = wfGetLBFactory()->newMainLB();
|
|
|
|
|
$db = $this->lb->getConnection( DB_SLAVE, 'backup' );
|
2010-12-04 03:20:14 +00:00
|
|
|
|
2007-03-09 15:26:41 +00:00
|
|
|
// Discourage the server from disconnecting us if it takes a long time
|
|
|
|
|
// to read out the big ol' batch query.
|
|
|
|
|
$db->setTimeout( 3600 * 24 );
|
2010-12-04 03:20:14 +00:00
|
|
|
|
2005-10-16 17:33:41 +00:00
|
|
|
return $db;
|
|
|
|
|
}
|
2010-12-04 03:20:14 +00:00
|
|
|
|
2009-09-14 22:32:30 +00:00
|
|
|
function __destruct() {
|
2010-05-22 16:50:39 +00:00
|
|
|
if ( isset( $this->lb ) ) {
|
2009-09-14 22:32:30 +00:00
|
|
|
$this->lb->closeAll();
|
|
|
|
|
}
|
|
|
|
|
}
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2005-10-16 17:33:41 +00:00
|
|
|
function backupServer() {
|
|
|
|
|
global $wgDBserver;
|
|
|
|
|
return $this->server
|
|
|
|
|
? $this->server
|
|
|
|
|
: $wgDBserver;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function reportPage() {
|
|
|
|
|
$this->pageCount++;
|
|
|
|
|
}
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2005-10-16 17:33:41 +00:00
|
|
|
function revCount() {
|
|
|
|
|
$this->revCount++;
|
2006-01-26 08:06:05 +00:00
|
|
|
$this->report();
|
2005-10-16 17:33:41 +00:00
|
|
|
}
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2005-10-16 17:33:41 +00:00
|
|
|
function report( $final = false ) {
|
2010-05-22 16:50:39 +00:00
|
|
|
if ( $final xor ( $this->revCount % $this->reportingInterval == 0 ) ) {
|
2005-10-16 17:33:41 +00:00
|
|
|
$this->showReport();
|
|
|
|
|
}
|
|
|
|
|
}
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2005-10-16 17:33:41 +00:00
|
|
|
function showReport() {
|
2010-05-22 16:50:39 +00:00
|
|
|
if ( $this->reporting ) {
|
2005-10-16 17:33:41 +00:00
|
|
|
$delta = wfTime() - $this->startTime;
|
|
|
|
|
$now = wfTimestamp( TS_DB );
|
2010-05-22 16:50:39 +00:00
|
|
|
if ( $delta ) {
|
2005-10-16 17:33:41 +00:00
|
|
|
$rate = $this->pageCount / $delta;
|
|
|
|
|
$revrate = $this->revCount / $delta;
|
2006-01-26 08:06:05 +00:00
|
|
|
$portion = $this->revCount / $this->maxCount;
|
2005-10-16 17:33:41 +00:00
|
|
|
$eta = $this->startTime + $delta / $portion;
|
|
|
|
|
$etats = wfTimestamp( TS_DB, intval( $eta ) );
|
|
|
|
|
} else {
|
|
|
|
|
$rate = '-';
|
|
|
|
|
$revrate = '-';
|
|
|
|
|
$etats = '-';
|
|
|
|
|
}
|
2006-01-26 08:06:05 +00:00
|
|
|
$this->progress( sprintf( "%s: %s %d pages (%0.3f/sec), %d revs (%0.3f/sec), ETA %s [max %d]",
|
2006-10-04 09:06:18 +00:00
|
|
|
$now, wfWikiID(), $this->pageCount, $rate, $this->revCount, $revrate, $etats, $this->maxCount ) );
|
2005-10-16 17:33:41 +00:00
|
|
|
}
|
|
|
|
|
}
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2005-10-16 17:33:41 +00:00
|
|
|
function progress( $string ) {
|
|
|
|
|
fwrite( $this->stderr, $string . "\n" );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class ExportProgressFilter extends DumpFilter {
|
|
|
|
|
function ExportProgressFilter( &$sink, &$progress ) {
|
2010-09-22 13:54:53 +00:00
|
|
|
parent::__construct( $sink );
|
2005-10-16 17:33:41 +00:00
|
|
|
$this->progress = $progress;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function writeClosePage( $string ) {
|
|
|
|
|
parent::writeClosePage( $string );
|
|
|
|
|
$this->progress->reportPage();
|
|
|
|
|
}
|
2006-01-07 13:31:29 +00:00
|
|
|
|
2005-10-16 17:33:41 +00:00
|
|
|
function writeRevision( $rev, $string ) {
|
|
|
|
|
parent::writeRevision( $rev, $string );
|
|
|
|
|
$this->progress->revCount();
|
|
|
|
|
}
|
|
|
|
|
}
|