FIX : $noback option

This commit is contained in:
atm-lena 2022-06-14 10:41:32 +02:00
parent 985c581c01
commit 82ddaeda74
2 changed files with 5 additions and 5 deletions

View File

@ -144,7 +144,7 @@ if ($action == 'add' && !empty($permissiontoadd)) {
$urltogo = $backtopage ? str_replace('__ID__', $result, $backtopage) : $backurlforlist;
$urltogo = preg_replace('/--IDFORBACKTOPAGE--/', $object->id, $urltogo); // New method to autoselect project after a New on another form object creation
if (!empty($noback)) {
if (empty($noback)) {
header("Location: " . $urltogo);
exit;
}
@ -320,7 +320,7 @@ if ($action == 'confirm_delete' && !empty($permissiontodelete)) {
// Delete OK
setEventMessages("RecordDeleted", null, 'mesgs');
if (!empty($noback)) {
if (empty($noback)) {
header("Location: " . $backurlforlist);
exit;
}
@ -366,7 +366,7 @@ if ($action == 'confirm_deleteline' && $confirm == 'yes' && !empty($permissionto
setEventMessages($langs->trans('RecordDeleted'), null, 'mesgs');
if (!empty($noback)) {
if (empty($noback)) {
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
exit;
}
@ -507,7 +507,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && !empty($permissiontoadd))
$newid = $result;
}
if (!empty($noback)) {
if (empty($noback)) {
header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $newid); // Open record of new object
exit;
}

View File

@ -135,7 +135,7 @@ if (empty($reshook)) {
//Create MO with Childs
if ($action == 'add' && empty($id) && !empty($TBomLineId)) {
$noback = 0;
$noback = 1;
include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
$mo_parent = $object;