From: Platonides Date: Sun, 17 Jan 2010 15:35:14 +0000 (+0000) Subject: Avoid r60976 breakage of unexpected line breaks inside maybeHelp X-Git-Tag: 1.31.0-rc.0~38229 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=b1012227978e11efc440cf4685ae1ebd023ee562;p=lhc%2Fweb%2Fwiklou.git Avoid r60976 breakage of unexpected line breaks inside maybeHelp --- diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index 202963f648..14602568e3 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -572,22 +572,23 @@ abstract class Maintenance { ksort( $this->mParams ); if( $this->hasOption( 'help' ) || $force ) { $this->mQuiet = false; + if( $this->mDescription ) { $this->output( "\n" . $this->mDescription . "\n" ); } - $this->output( "\nUsage: php " . $this->mSelf ); + $output = "\nUsage: php " . $this->mSelf; if( $this->mParams ) { - $this->output( " [--" . implode( array_keys( $this->mParams ), "|--" ) . "]" ); + $output .= " [--" . implode( array_keys( $this->mParams ), "|--" ) . "]"; } if( $this->mArgList ) { - $this->output( " <" ); + $output .= " <"; foreach( $this->mArgList as $k => $arg ) { - $this->output( $arg['name'] . ">" ); + $output .= $arg['name'] . ">"; if( $k < count( $this->mArgList ) - 1 ) - $this->output( " <" ); + $output .= " <"; } } - $this->output( "\n" ); + $this->output( "$output\n" ); foreach( $this->mParams as $par => $info ) { $this->output( "\t$par : " . $info['desc'] . "\n" ); }