mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-23 16:06:53 +00:00
persistRevisionThreadItems: Allow processing all pages in a namespace
Bug: T332745 Change-Id: I3014c9aab1df5aff6fe36742daef77b3b21a2445
This commit is contained in:
parent
62dbb8128b
commit
174533e41d
|
@ -35,6 +35,7 @@ class PersistRevisionThreadItems extends Maintenance {
|
|||
$this->addDescription( 'Persist thread item information for the given pages/revisions' );
|
||||
$this->addOption( 'rev', 'Revision ID to process', false, true, false, true );
|
||||
$this->addOption( 'page', 'Page title to process', false, true, false, true );
|
||||
$this->addOption( 'namespace', 'Namespace number to process', false, true, false, true );
|
||||
$this->addOption( 'all', 'Process the whole wiki' );
|
||||
$this->addOption( 'current', 'Process current revisions only' );
|
||||
$this->addOption( 'start', 'Restart from this position (as printed by the script)', false, true );
|
||||
|
@ -56,6 +57,9 @@ class PersistRevisionThreadItems extends Maintenance {
|
|||
if ( $this->getOption( 'all' ) ) {
|
||||
// Do nothing
|
||||
|
||||
} elseif ( $this->getOption( 'namespace' ) ) {
|
||||
$qb->where( [ 'page_namespace' => $this->getOption( 'namespace' ) ] );
|
||||
|
||||
} elseif ( $this->getOption( 'page' ) ) {
|
||||
$linkBatch = $services->getLinkBatchFactory()->newLinkBatch();
|
||||
foreach ( $this->getOption( 'page' ) as $page ) {
|
||||
|
|
Loading…
Reference in a new issue