forked from Wavyzz/dolibarr
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d942c9d1a |
@@ -292,17 +292,19 @@ class Utils
|
|||||||
dol_syslog("Run command ".$fullcommandcrypted);
|
dol_syslog("Run command ".$fullcommandcrypted);
|
||||||
$handlein = popen($fullcommandclear, 'r');
|
$handlein = popen($fullcommandclear, 'r');
|
||||||
$i=0;
|
$i=0;
|
||||||
while (!feof($handlein))
|
if ($handlein) {
|
||||||
{
|
while (!feof($handlein))
|
||||||
$i++; // output line number
|
{
|
||||||
$read = fgets($handlein);
|
$i++; // output line number
|
||||||
// Exclude warning line we don't want
|
$read = fgets($handlein);
|
||||||
if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue;
|
// Exclude warning line we don't want
|
||||||
fwrite($handle,$read);
|
if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue;
|
||||||
if (preg_match('/'.preg_quote('-- Dump completed').'/i',$read)) $ok=1;
|
fwrite($handle,$read);
|
||||||
elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i',$read)) $ok=1;
|
if (preg_match('/'.preg_quote('-- Dump completed').'/i',$read)) $ok=1;
|
||||||
|
elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i',$read)) $ok=1;
|
||||||
|
}
|
||||||
|
pclose($handlein);
|
||||||
}
|
}
|
||||||
pclose($handlein);
|
|
||||||
|
|
||||||
if ($compression == 'none') fclose($handle);
|
if ($compression == 'none') fclose($handle);
|
||||||
if ($compression == 'gz') gzclose($handle);
|
if ($compression == 'gz') gzclose($handle);
|
||||||
|
|||||||
Reference in New Issue
Block a user