UpdateDatabase.php
[Pman.Core] / UpdateDatabase.php
index c55397d..922be24 100644 (file)
@@ -392,7 +392,7 @@ class Pman_Core_UpdateDatabase extends Pman
                     continue;
                 }
                 
-                $cmd = "$mysql_cmd -f < " . escapeshellarg($fn) ;
+                $cmd = "$mysql_cmd -f < " . escapeshellarg($fn) ." 2>&1" ;
                 
                 echo basename($dir).'/'. basename($fn) .    '::' .  $cmd. ($this->cli ? "\n" : "<BR>\n");
                 
@@ -401,7 +401,7 @@ class Pman_Core_UpdateDatabase extends Pman
                 while(!feof($fp)) 
                 { 
                     // send the current file part to the browser 
-                    $line = fread($fp, 1024);
+                    $line = trim(fgets($fp, 1024));
                     echo '->>> ' .  $line . " <<<---\n";
                     echo "--";