X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcommandLine.inc;h=206e04677b4a46cab494cb3d42d2caeb565e8b5e;hb=f704bd42cad62ebf360eb26b673dcc521e5c3715;hp=1a05907979f2afa99357073711ded47935a53e2a;hpb=8578488e2b79dddca9a80edba1c9966d88d62ddf;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 ); + } } /**