Try to fix some other broken-looking legacy maintenance script options
authorAlex Monk <krenair@gmail.com>
Thu, 4 Feb 2016 00:04:12 +0000 (00:04 +0000)
committerAlex Monk <krenair@gmail.com>
Sat, 12 Mar 2016 00:47:36 +0000 (00:47 +0000)
Bug: T125748
Change-Id: I2004d9b1fd7389623a3f2da6682f9007efd679dc

maintenance/language/checkDupeMessages.php
maintenance/language/checkLanguage.php
maintenance/language/transstat.php
maintenance/mcc.php
maintenance/preprocessorFuzzTest.php
maintenance/storage/checkStorage.php
maintenance/storage/moveToExternal.php

index 5d48244..baa9c71 100644 (file)
@@ -21,6 +21,7 @@
  * @ingroup MaintenanceLanguage
  */
 
+$optionsWithArgs = [ 'lang', 'clang', 'mode' ];
 require_once __DIR__ . '/../commandLine.inc';
 $messagesDir = __DIR__ . '/../../languages/messages/';
 $runTest = false;
index bd9f9af..a8cbac1 100644 (file)
  * @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';
index ca94473..7202952 100644 (file)
@@ -27,6 +27,7 @@
  * https://www.mediawiki.org/wiki/Localisation_statistics
  */
 $optionsWithArgs = [ 'output' ];
+$optionsWithoutArgs = [ 'help' ];
 
 require_once __DIR__ . '/../commandLine.inc';
 require_once 'languages.inc';
index 0fff823..784ba0e 100644 (file)
  * @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;
index 4f478ac..aa5d69d 100644 (file)
@@ -21,6 +21,7 @@
  * @ingroup Maintenance
  */
 
+$optionsWithoutArgs = [ 'verbose' ];
 require_once __DIR__ . '/commandLine.inc';
 
 $wgHooks['BeforeParserFetchTemplateAndtitle'][] = 'PPFuzzTester::templateHook';
index 9da3909..d69e5b9 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 if ( !defined( 'MEDIAWIKI' ) ) {
+       $optionsWithoutArgs = [ 'fix' ];
        require_once __DIR__ . '/../commandLine.inc';
 
        $cs = new CheckStorage;
index 776b72f..80dc7f9 100644 (file)
@@ -24,6 +24,7 @@
 define( 'REPORTING_INTERVAL', 1 );
 
 if ( !defined( 'MEDIAWIKI' ) ) {
+       $optionsWithArgs = [ 'e', 's' ];
        require_once __DIR__ . '/../commandLine.inc';
        require_once 'resolveStubs.php';