$sink = null;
$sinks = array();
foreach( $args as $arg ) {
+ $matches = array();
if( preg_match( '/^--(.+?)(?:=(.+?)(?::(.+?))?)?$/', $arg, $matches ) ) {
- @list( $full, $opt, $val, $param ) = $matches;
+ @list( /* $full */ , $opt, $val, $param ) = $matches;
switch( $opt ) {
case "plugin":
$this->loadPlugin( $val, $param );
$this->initProgress( $history );
$db =& $this->backupDb();
- $exporter = new WikiExporter( $db, $history, MW_EXPORT_STREAM, $text );
+ $exporter = new WikiExporter( $db, $history, WikiExporter::STREAM, $text );
$wrapper = new ExportProgressFilter( $this->sink, $this );
$exporter->setOutputSink( $wrapper );
* Initialise starting time and maximum revision count.
* We'll make ETA calculations based an progress, assuming relatively
* constant per-revision rate.
- * @param int $history MW_EXPORT_CURRENT or MW_EXPORT_FULL
+ * @param int $history WikiExporter::CURRENT or WikiExporter::FULL
*/
- function initProgress( $history = MW_EXPORT_FULL ) {
- $table = ($history == MW_EXPORT_CURRENT) ? 'page' : 'revision';
- $field = ($history == MW_EXPORT_CURRENT) ? 'page_id' : 'rev_id';
+ function initProgress( $history = WikiExporter::FULL ) {
+ $table = ($history == WikiExporter::CURRENT) ? 'page' : 'revision';
+ $field = ($history == WikiExporter::CURRENT) ? 'page_id' : 'rev_id';
$dbr =& wfGetDB( DB_SLAVE );
$this->maxCount = $dbr->selectField( $table, "MAX($field)", '', 'BackupDumper::dump' );