From: Alex Monk Date: Thu, 4 Feb 2016 00:04:12 +0000 (+0000) Subject: Try to fix some other broken-looking legacy maintenance script options X-Git-Tag: 1.31.0-rc.0~7570^2 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=aa838b52de9624cf10abe92758c7bbb1416d3001;p=lhc%2Fweb%2Fwiklou.git Try to fix some other broken-looking legacy maintenance script options Bug: T125748 Change-Id: I2004d9b1fd7389623a3f2da6682f9007efd679dc --- diff --git a/maintenance/language/checkDupeMessages.php b/maintenance/language/checkDupeMessages.php index 5d482442a9..baa9c713a8 100644 --- a/maintenance/language/checkDupeMessages.php +++ b/maintenance/language/checkDupeMessages.php @@ -21,6 +21,7 @@ * @ingroup MaintenanceLanguage */ +$optionsWithArgs = [ 'lang', 'clang', 'mode' ]; require_once __DIR__ . '/../commandLine.inc'; $messagesDir = __DIR__ . '/../../languages/messages/'; $runTest = false; diff --git a/maintenance/language/checkLanguage.php b/maintenance/language/checkLanguage.php index bd9f9af8c5..a8cbac1c22 100644 --- a/maintenance/language/checkLanguage.php +++ b/maintenance/language/checkLanguage.php @@ -21,6 +21,12 @@ * @ingroup MaintenanceLanguage */ +$optionsWithArgs = [ + 'lang', 'level', 'blacklist', 'whitelist', 'wikilang', 'output', 'prefix' +]; +$optionsWithoutArgs = [ + 'help', 'links', 'noexif', 'easy', 'duplicate', 'all' +]; require_once __DIR__ . '/../commandLine.inc'; require_once 'checkLanguage.inc'; require_once 'languages.inc'; diff --git a/maintenance/language/transstat.php b/maintenance/language/transstat.php index ca94473f8f..720295234c 100644 --- a/maintenance/language/transstat.php +++ b/maintenance/language/transstat.php @@ -27,6 +27,7 @@ * https://www.mediawiki.org/wiki/Localisation_statistics */ $optionsWithArgs = [ 'output' ]; +$optionsWithoutArgs = [ 'help' ]; require_once __DIR__ . '/../commandLine.inc'; require_once 'languages.inc'; diff --git a/maintenance/mcc.php b/maintenance/mcc.php index 0fff823a0f..784ba0ea35 100644 --- a/maintenance/mcc.php +++ b/maintenance/mcc.php @@ -22,11 +22,12 @@ * @ingroup Maintenance */ -/** */ +$optionsWithArgs = [ 'cache' ]; +$optionsWithoutArgs = [ + 'debug', 'help' +]; require_once __DIR__ . '/commandLine.inc'; -$options = getopt( '', [ 'debug', 'help', 'cache:' ] ); - $debug = isset( $options['debug'] ); $help = isset( $options['help'] ); $cache = isset( $options['cache'] ) ? $options['cache'] : null; diff --git a/maintenance/preprocessorFuzzTest.php b/maintenance/preprocessorFuzzTest.php index 4f478ac972..aa5d69d95d 100644 --- a/maintenance/preprocessorFuzzTest.php +++ b/maintenance/preprocessorFuzzTest.php @@ -21,6 +21,7 @@ * @ingroup Maintenance */ +$optionsWithoutArgs = [ 'verbose' ]; require_once __DIR__ . '/commandLine.inc'; $wgHooks['BeforeParserFetchTemplateAndtitle'][] = 'PPFuzzTester::templateHook'; diff --git a/maintenance/storage/checkStorage.php b/maintenance/storage/checkStorage.php index 9da39099a8..d69e5b9413 100644 --- a/maintenance/storage/checkStorage.php +++ b/maintenance/storage/checkStorage.php @@ -22,6 +22,7 @@ */ if ( !defined( 'MEDIAWIKI' ) ) { + $optionsWithoutArgs = [ 'fix' ]; require_once __DIR__ . '/../commandLine.inc'; $cs = new CheckStorage; diff --git a/maintenance/storage/moveToExternal.php b/maintenance/storage/moveToExternal.php index 776b72fe41..80dc7f9620 100644 --- a/maintenance/storage/moveToExternal.php +++ b/maintenance/storage/moveToExternal.php @@ -24,6 +24,7 @@ define( 'REPORTING_INTERVAL', 1 ); if ( !defined( 'MEDIAWIKI' ) ) { + $optionsWithArgs = [ 'e', 's' ]; require_once __DIR__ . '/../commandLine.inc'; require_once 'resolveStubs.php';