Avoid r60976 breakage of unexpected line breaks inside maybeHelp
authorPlatonides <platonides@users.mediawiki.org>
Sun, 17 Jan 2010 15:35:14 +0000 (15:35 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Sun, 17 Jan 2010 15:35:14 +0000 (15:35 +0000)
maintenance/Maintenance.php

index 202963f..1460256 100644 (file)
@@ -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" );
                        }