dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "RCFilters: Store invert as a standard filter/parameter"
[lhc/web/wiklou.git]
/
maintenance
/
importDump.php
diff --git
a/maintenance/importDump.php
b/maintenance/importDump.php
index
6717a8e
..
206c7ee
100644
(file)
--- a/
maintenance/importDump.php
+++ b/
maintenance/importDump.php
@@
-37,6
+37,7
@@
class BackupReader extends Maintenance {
public $revCount = 0;
public $dryRun = false;
public $uploads = false;
public $revCount = 0;
public $dryRun = false;
public $uploads = false;
+ protected $uploadCount = 0;
public $imageBasePath = false;
public $nsFilter = false;
public $imageBasePath = false;
public $nsFilter = false;
@@
-80,6
+81,7
@@
TEXT
'Disable link table updates. Is faster but leaves the wiki in an inconsistent state'
);
$this->addOption( 'image-base-path', 'Import files from a specified path', false, true );
'Disable link table updates. Is faster but leaves the wiki in an inconsistent state'
);
$this->addOption( 'image-base-path', 'Import files from a specified path', false, true );
+ $this->addOption( 'skip-to', 'Start from nth page by skipping first n-1 pages', false, true );
$this->addArg( 'file', 'Dump file to import [else use stdin]', false );
}
$this->addArg( 'file', 'Dump file to import [else use stdin]', false );
}
@@
-301,6
+303,11
@@
TEXT
return false;
}
}
return false;
}
}
+ if ( $this->hasOption( 'skip-to' ) ) {
+ $nthPage = (int)$this->getOption( 'skip-to' );
+ $importer->setPageOffset( $nthPage );
+ $this->pageCount = $nthPage - 1;
+ }
$importer->setPageCallback( [ $this, 'reportPage' ] );
$this->importCallback = $importer->setRevisionCallback(
[ $this, 'handleRevision' ] );
$importer->setPageCallback( [ $this, 'reportPage' ] );
$this->importCallback = $importer->setRevisionCallback(
[ $this, 'handleRevision' ] );