Fix #yogosha12949
This commit is contained in:
parent
2aea86dc8c
commit
dc85e0df88
@ -354,6 +354,8 @@ class Utils
|
|||||||
|
|
||||||
$handle = '';
|
$handle = '';
|
||||||
|
|
||||||
|
// If $lowmemorydump is set, it means we want to make the compression using an external pipe instead retreiving the
|
||||||
|
// content of the dump in PHP memory array $output_arr and then print it into the PHP pipe open with xopen().
|
||||||
$lowmemorydump = GETPOSTISSET("lowmemorydump") ? GETPOST("lowmemorydump") : getDolGlobalString('MAIN_LOW_MEMORY_DUMP');
|
$lowmemorydump = GETPOSTISSET("lowmemorydump") ? GETPOST("lowmemorydump") : getDolGlobalString('MAIN_LOW_MEMORY_DUMP');
|
||||||
|
|
||||||
// Start call method to execute dump
|
// Start call method to execute dump
|
||||||
@ -371,22 +373,22 @@ class Utils
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($compression == 'none') {
|
if ($compression == 'none') {
|
||||||
$fullcommandclear .= " > ".$outputfile;
|
$fullcommandclear .= " > ".dol_sanitizePathName($outputfile);
|
||||||
$fullcommandcrypted .= " > ".$outputfile;
|
$fullcommandcrypted .= " > ".dol_sanitizePathName($outputfile);
|
||||||
$handle = 1;
|
$handle = 1;
|
||||||
} elseif ($compression == 'gz') {
|
} elseif ($compression == 'gz') {
|
||||||
$fullcommandclear .= " | gzip > ".$outputfile;
|
$fullcommandclear .= " | gzip > ".dol_sanitizePathName($outputfile);
|
||||||
$fullcommandcrypted .= " | gzip > ".$outputfile;
|
$fullcommandcrypted .= " | gzip > ".dol_sanitizePathName($outputfile);
|
||||||
$paramcrypted.=" | gzip";
|
$paramcrypted.=" | gzip";
|
||||||
$handle = 1;
|
$handle = 1;
|
||||||
} elseif ($compression == 'bz') {
|
} elseif ($compression == 'bz') {
|
||||||
$fullcommandclear .= " | bzip2 > ".$outputfile;
|
$fullcommandclear .= " | bzip2 > ".dol_sanitizePathName($outputfile);
|
||||||
$fullcommandcrypted .= " | bzip2 > ".$outputfile;
|
$fullcommandcrypted .= " | bzip2 > ".dol_sanitizePathName($outputfile);
|
||||||
$paramcrypted.=" | bzip2";
|
$paramcrypted.=" | bzip2";
|
||||||
$handle = 1;
|
$handle = 1;
|
||||||
} elseif ($compression == 'zstd') {
|
} elseif ($compression == 'zstd') {
|
||||||
$fullcommandclear .= " | zstd > ".$outputfile;
|
$fullcommandclear .= " | zstd > ".dol_sanitizePathName($outputfile);
|
||||||
$fullcommandcrypted .= " | zstd > ".$outputfile;
|
$fullcommandcrypted .= " | zstd > ".dol_sanitizePathName($outputfile);
|
||||||
$paramcrypted.=" | zstd";
|
$paramcrypted.=" | zstd";
|
||||||
$handle = 1;
|
$handle = 1;
|
||||||
}
|
}
|
||||||
@ -411,8 +413,8 @@ class Utils
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// TODO Replace with executeCLI function but
|
// TODO Replace with Utils->executeCLI() function but
|
||||||
// we must first introduce a low memory mode
|
// we must first introduce the variant with $lowmemorydump into this method.
|
||||||
if ($execmethod == 1) {
|
if ($execmethod == 1) {
|
||||||
$output_arr = array();
|
$output_arr = array();
|
||||||
$retval = null;
|
$retval = null;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user