restore default behavior for Maintenance::output when no channel specified (channeled...
authorAriel Glenn <ariel@users.mediawiki.org>
Fri, 4 Jun 2010 01:43:56 +0000 (01:43 +0000)
committerAriel Glenn <ariel@users.mediawiki.org>
Fri, 4 Jun 2010 01:43:56 +0000 (01:43 +0000)
maintenance/Maintenance.php

index dc33be5..3614adf 100644 (file)
@@ -223,8 +223,15 @@ abstract class Maintenance {
                if ( $this->mQuiet ) {
                        return;
                }
-               $out = preg_replace( '/\n\z/', '', $out );
-               $this->outputChanneled( $out, $channel );
+               if ( $channel === null ) {
+                       $f = fopen( 'php://stdout', 'w' );
+                       fwrite( $f, $out );
+                       fclose( $f );
+               }
+               else {
+                       $out = preg_replace( '/\n\z/', '', $out );
+                       $this->outputChanneled( $out, $channel );
+               }
        }
 
        /**