X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FimportDump.php;h=802619e5733988b9955001600cbaf25a75cb6275;hb=10d1b7d12b5d097413cd507740c5c71781c2580b;hp=6717a8ebde04654ac82004eb30d381760834bbc3;hpb=892b17237bb44630fa6f508c5bf85374a62def13;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/importDump.php b/maintenance/importDump.php index 6717a8ebde..802619e573 100644 --- a/maintenance/importDump.php +++ b/maintenance/importDump.php @@ -80,6 +80,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 ); + $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 ); } @@ -301,6 +302,11 @@ TEXT 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' ] );