Merge pull request #21257 from atm-lena/develop_FIX_nobackoption_actionaddupdatedelete
FIX : $noback option
This commit is contained in:
commit
6bd89922b9
@ -144,7 +144,7 @@ if ($action == 'add' && !empty($permissiontoadd)) {
|
|||||||
$urltogo = $backtopage ? str_replace('__ID__', $result, $backtopage) : $backurlforlist;
|
$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
|
$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);
|
header("Location: " . $urltogo);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@ -320,7 +320,7 @@ if ($action == 'confirm_delete' && !empty($permissiontodelete)) {
|
|||||||
// Delete OK
|
// Delete OK
|
||||||
setEventMessages("RecordDeleted", null, 'mesgs');
|
setEventMessages("RecordDeleted", null, 'mesgs');
|
||||||
|
|
||||||
if (!empty($noback)) {
|
if (empty($noback)) {
|
||||||
header("Location: " . $backurlforlist);
|
header("Location: " . $backurlforlist);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@ -366,7 +366,7 @@ if ($action == 'confirm_deleteline' && $confirm == 'yes' && !empty($permissionto
|
|||||||
|
|
||||||
setEventMessages($langs->trans('RecordDeleted'), null, 'mesgs');
|
setEventMessages($langs->trans('RecordDeleted'), null, 'mesgs');
|
||||||
|
|
||||||
if (!empty($noback)) {
|
if (empty($noback)) {
|
||||||
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
|
header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@ -507,7 +507,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && !empty($permissiontoadd))
|
|||||||
$newid = $result;
|
$newid = $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($noback)) {
|
if (empty($noback)) {
|
||||||
header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $newid); // Open record of new object
|
header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $newid); // Open record of new object
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -135,7 +135,7 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
//Create MO with Childs
|
//Create MO with Childs
|
||||||
if ($action == 'add' && empty($id) && !empty($TBomLineId)) {
|
if ($action == 'add' && empty($id) && !empty($TBomLineId)) {
|
||||||
$noback = 0;
|
$noback = 1;
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
|
||||||
|
|
||||||
$mo_parent = $object;
|
$mo_parent = $object;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user