mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-31 14:12:29 +01:00
Fix permissions #yogosha13771
This commit is contained in:
@@ -417,13 +417,16 @@ class Utils
|
||||
}
|
||||
|
||||
|
||||
// TODO Replace with Utils->executeCLI() function but
|
||||
// we must first introduce the variant with $lowmemorydump into this method.
|
||||
if ($execmethod == 1) {
|
||||
$output_arr = array();
|
||||
$retval = null;
|
||||
|
||||
exec($fullcommandclear, $output_arr, $retval);
|
||||
// TODO Replace this exec with Utils->executeCLI() function.
|
||||
// We must check that the case for $lowmemorydump works too...
|
||||
//$utils = new Utils($db);
|
||||
//$outputfile = $conf->admin->dir_temp.'/dump.tmp';
|
||||
//$utils->executeCLI($fullcommandclear, $outputfile, 0);
|
||||
|
||||
if ($retval != 0) {
|
||||
$langs->load("errors");
|
||||
@@ -438,6 +441,8 @@ class Utils
|
||||
if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) {
|
||||
continue;
|
||||
}
|
||||
// Now check into the result file, that the file end with "-- Dump completed"
|
||||
// This is possible only if $output_arr is the clear dump file, so not possible with $lowmemorydump set because file is already compressed.
|
||||
if (!$lowmemorydump) {
|
||||
fwrite($handle, $read.($execmethod == 2 ? '' : "\n"));
|
||||
if (preg_match('/'.preg_quote('-- Dump completed', '/').'/i', $read)) {
|
||||
|
||||
Reference in New Issue
Block a user