From: Chad Horohoe Date: Thu, 6 Aug 2009 00:32:50 +0000 (+0000) Subject: Clean up missing param error, show help on die. -params are still kind of wonky.... X-Git-Tag: 1.31.0-rc.0~40472 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=bbce0998bdd6982ebfc1b97e122c784001c72cb1;p=lhc%2Fweb%2Fwiklou.git Clean up missing param error, show help on die. -params are still kind of wonky. Could use a second set of eyes. --- diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 1e1ef994ff..22be3f3318 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -413,7 +413,8 @@ abstract class Maintenance { if ( isset( $this->mParams[$option] ) && $this->mParams[$option]['withArg'] ) { $param = next( $argv ); if ( $param === false ) { - $this->error( "$arg needs a value after it", true ); + $this->error( "\nERROR: $option needs a value after it\n" ); + $this->maybeHelp( true ); } $options[$option] = $param; } else { @@ -433,7 +434,8 @@ abstract class Maintenance { if ( $this->mParams[$option]['withArg'] ) { $param = next( $argv ); if ( $param === false ) { - $this->error( "$arg needs a value after it", true ); + $this->error( "\nERROR: $option needs a value after it\n" ); + $this->maybeHelp( true ); } $options[$option] = $param; } else {