From 9a81cbd40a7f4d87985c49646b5bc35a3f382d1c Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Thu, 24 Sep 2009 21:41:17 +0000 Subject: [PATCH] Re-implementing Maintenance::maybeHelp() in CommandLineInc to not show Maintenance's help when passing --help (previous method was not working correctly) --- maintenance/commandLine.inc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/maintenance/commandLine.inc b/maintenance/commandLine.inc index 6ed7b2e5b3..625161a98a 100644 --- a/maintenance/commandLine.inc +++ b/maintenance/commandLine.inc @@ -16,9 +16,15 @@ class CommandLineInc extends Maintenance { foreach ( $optionsWithArgs as $name ) { $this->addOption( $name, '', false, true ); } + } - # No help, it would just be misleading since it misses custom options - unset( $this->mParams['help'] ); + /** + * No help, it would just be misleading since it misses custom options + */ + protected function maybeHelp( $force = false ) { + if ( !$force ) + return; + parent::maybeHelp( true ); } public function execute() { -- 2.20.1