split getHooksFromDoc() function
[lhc/web/wiklou.git] / maintenance / Maintenance.php
index 5e7f0d4..454891f 100644 (file)
@@ -310,7 +310,7 @@ abstract class Maintenance {
                if ( $channel === null ) {
                        $this->cleanupChanneled();
 
-                       $f = fopen( 'php://stdout', 'w' );
+                       $f = fopen( 'php://stdout', 'a' );
                        fwrite( $f, $out );
                        fclose( $f );
                }
@@ -331,7 +331,7 @@ abstract class Maintenance {
                if ( php_sapi_name() == 'cli' ) {
                        fwrite( STDERR, $err . "\n" );
                } else {
-                       $f = fopen( 'php://stderr', 'w' );
+                       $f = fopen( 'php://stderr', 'a' );
                        fwrite( $f, $err . "\n" );
                        fclose( $f );
                }
@@ -370,7 +370,7 @@ abstract class Maintenance {
                        return;
                }
 
-               $handle = fopen( 'php://stdout', 'w' );
+               $handle = fopen( 'php://stdout', 'a' );
 
                // End the current line if necessary
                if ( !$this->atLineStart && $channel !== $this->lastChannel ) {
@@ -456,6 +456,9 @@ abstract class Maintenance {
                        }
                }
 
+               /**
+                * @var $child Maintenance
+                */
                $child = new $maintClass();
                $child->loadParamsAndArgs( $this->mSelf, $this->mOptions, $this->mArgs );
                if ( !is_null( $this->mDb ) ) {