jenkins-bot has submitted this change and it was merged.
Change subject: Register importImages options without arguments as actual
maintenance script options so they are usable
......................................................................
Register importImages options without arguments as actual maintenance script
options so they are usable
Change-Id: Ia3ba7ed221a4cf7fcf78a6c64f5a59109a1b886d
---
M maintenance/commandLine.inc
M maintenance/importImages.php
2 files changed, 14 insertions(+), 1 deletion(-)
Approvals:
Legoktm: Looks good to me, approved
Daniel Kinzler: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/maintenance/commandLine.inc b/maintenance/commandLine.inc
index e871a4e..206e046 100644
--- a/maintenance/commandLine.inc
+++ b/maintenance/commandLine.inc
@@ -25,20 +25,27 @@
// @codingStandardsIgnoreStart
MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
global $optionsWithArgs;
+global $optionsWithoutArgs;
// @codingStandardsIgnoreEnd
if ( !isset( $optionsWithArgs ) ) {
$optionsWithArgs = [];
+}
+if ( !isset( $optionsWithoutArgs ) ) {
+ $optionsWithoutArgs = [];
}
class CommandLineInc extends Maintenance {
public function __construct() {
// @codingStandardsIgnoreStart
MediaWiki.NamingConventions.ValidGlobalName.wgPrefix
- global $optionsWithArgs;
+ global $optionsWithArgs, $optionsWithoutArgs;
// @codingStandardsIgnoreEnd
parent::__construct();
foreach ( $optionsWithArgs as $name ) {
$this->addOption( $name, '', false, true );
}
+ foreach ( $optionsWithoutArgs as $name ) {
+ $this->addOption( $name, '', false, false );
+ }
}
/**
diff --git a/maintenance/importImages.php b/maintenance/importImages.php
index f0c6569..512c38c 100644
--- a/maintenance/importImages.php
+++ b/maintenance/importImages.php
@@ -36,6 +36,12 @@
'extensions', 'comment', 'comment-file', 'comment-ext', 'summary',
'user',
'license', 'sleep', 'limit', 'from', 'source-wiki-url', 'timestamp',
];
+
+$optionsWithoutArgs = [
+ 'protect', 'unprotect', 'search-recursively', 'check-userblock',
'overwrite',
+ 'skip-dupes', 'dry'
+];
+
require_once __DIR__ . '/commandLine.inc';
require_once __DIR__ . '/importImages.inc';
$processed = $added = $ignored = $skipped = $overwritten = $failed = 0;
--
To view, visit https://gerrit.wikimedia.org/r/268314
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia3ba7ed221a4cf7fcf78a6c64f5a59109a1b886d
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: TTO <[email protected]>
Gerrit-Reviewer: Tim Starling <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits