Ori.livneh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/254896

Change subject: arbcomlist.php: add '--mainspace-only' option
......................................................................

arbcomlist.php: add '--mainspace-only' option

Allow the edit count requirement to be limited to mainspace edits (or not) via
the '--mainspace-only' command line argument. This allows us to consolidate
makeSimpleList.php and arbcomlist.php, which I will do in a follow-up patch.

Change-Id: I2a557198d573913db4f9e700313198026bff1376
---
M cli/wm-scripts/arbcomlist.php
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SecurePoll 
refs/changes/96/254896/1

diff --git a/cli/wm-scripts/arbcomlist.php b/cli/wm-scripts/arbcomlist.php
index 8d43c88..0597d44 100644
--- a/cli/wm-scripts/arbcomlist.php
+++ b/cli/wm-scripts/arbcomlist.php
@@ -16,7 +16,8 @@
 if ( !isset( $args[0] ) ) {
        echo <<<EOD
 Usage: php arbcomlist.php [--ignore-existing|--replace] [--before=<date>]
-                          [--edits=num] [--start-from=<user_id>] <name>
+                          [--edits=num] [--mainspace-only]
+                          [--start-from=<user_id>] <name>
 EOD;
        exit( 1 );
 }
@@ -64,7 +65,9 @@
                if ( $before !== false ) {
                        $conds[] = 'rev_timestamp < ' . $dbr->addQuotes( 
$before );
                }
-               $conds['page_namespace'] = 0;
+               if ( isset( $options['mainspace-only'] ) ) {
+                       $conds['page_namespace'] = 0;
+               }
 
                $edits = $dbr->selectRowCount(
                        array( 'revision', 'page' ),

-- 
To view, visit https://gerrit.wikimedia.org/r/254896
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a557198d573913db4f9e700313198026bff1376
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SecurePoll
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <o...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to