FIX Option low memory mode in backup was broken

This commit is contained in:
ldestailleur
2025-08-20 20:07:19 +02:00
parent ac1ad4e904
commit efcd392bb8
3 changed files with 6 additions and 6 deletions

View File

@@ -121,7 +121,7 @@ $outputdir = $conf->admin->dir_output.'/backup';
$result = dol_mkdir($outputdir);
$lowmemorydump = GETPOSTISSET("lowmemorydump") ? GETPOST("lowmemorydump") : getDolGlobalString('MAIN_LOW_MEMORY_DUMP');
$lowmemorydump = (int) (GETPOSTISSET("lowmemorydump") ? GETPOSTINT("lowmemorydump") : getDolGlobalInt('MAIN_LOW_MEMORY_DUMP'));
// MYSQL
@@ -156,7 +156,7 @@ if ($what == 'mysql') {
}
if (!$errormsg) {
$result = $utils->dumpDatabase(GETPOST('compression', 'alpha'), $what, 0, $file, 0, 0, (int) $lowmemorydump);
$result = $utils->dumpDatabase(GETPOST('compression', 'alpha'), $what, 0, $file, 0, 0, $lowmemorydump);
$errormsg = $utils->error;
$_SESSION["commandbackuplastdone"] = $utils->result['commandbackuplastdone'];
@@ -166,7 +166,7 @@ if ($what == 'mysql') {
// MYSQL NO BIN
if ($what == 'mysqlnobin') {
$utils->dumpDatabase(GETPOST('compression', 'alpha'), $what, 0, $file, 0, 0, (int) $lowmemorydump);
$utils->dumpDatabase(GETPOST('compression', 'alpha'), $what, 0, $file, 0, 0, $lowmemorydump);
$errormsg = $utils->error;
$_SESSION["commandbackuplastdone"] = $utils->result['commandbackuplastdone'];
@@ -196,7 +196,7 @@ if ($what == 'postgresql') {
}
if (!$errormsg) {
$utils->dumpDatabase(GETPOST('compression', 'alpha'), $what, 0, $file, 0, 0, (int) $lowmemorydump);
$utils->dumpDatabase(GETPOST('compression', 'alpha'), $what, 0, $file, 0, 0, $lowmemorydump);
$errormsg = $utils->error;
$_SESSION["commandbackuplastdone"] = $utils->result['commandbackuplastdone'];
$_SESSION["commandbackuptorun"] = $utils->result['commandbackuptorun'];