X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcommandLine.inc;h=206e04677b4a46cab494cb3d42d2caeb565e8b5e;hb=5b6883f63ac2155f2434233b8a7eddbe8f67afb4;hp=1a05907979f2afa99357073711ded47935a53e2a;hpb=b24a0048185fe7c4d86f8b55872ad749c6ab52e6;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/commandLine.inc b/maintenance/commandLine.inc index 1a05907979..206e04677b 100644 --- a/maintenance/commandLine.inc +++ b/maintenance/commandLine.inc @@ -25,20 +25,27 @@ require_once __DIR__ . '/Maintenance.php'; // @codingStandardsIgnoreStart MediaWiki.NamingConventions.ValidGlobalName.wgPrefix global $optionsWithArgs; +global $optionsWithoutArgs; // @codingStandardsIgnoreEnd if ( !isset( $optionsWithArgs ) ) { - $optionsWithArgs = array(); + $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 ); + } } /**