X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcommandLine.inc;h=206e04677b4a46cab494cb3d42d2caeb565e8b5e;hb=1326bfc813fc789935088bea572f11cca83ce8d5;hp=e871a4e863c9a0e78b88c482ad146c0e353489fd;hpb=2a1fcd27c19913394c179cbe8be1a9e981d7f81b;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/commandLine.inc b/maintenance/commandLine.inc index e871a4e863..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 = []; } +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 ); + } } /**