2
0
forked from Wavyzz/dolibarr

NEW: default add action: new param $backurlforcard to redict to card

This commit is contained in:
Marc de Lima Lucio
2018-04-11 12:32:55 +02:00
parent cdcfe8e356
commit 2a265e9de9
2 changed files with 3 additions and 1 deletions

View File

@@ -26,6 +26,7 @@
// $object must be defined
// $permissiontoadd must be defined
// $permissiontodelete must be defined
// $backurlforcard must be defined
// $backurlforlist must be defined
// $backtopage may be defined
@@ -66,7 +67,7 @@ if ($action == 'add' && ! empty($permissiontoadd))
if ($result > 0)
{
// Creation OK
$urltogo=$backtopage?$backtopage:$backurlforlist;
$urltogo=$backtopage?$backtopage:($backurlforcard?str_replace('__ID__', $result, $backurlforcard):$backurlforlist);
header("Location: ".$urltogo);
exit;
}