From 865b7cbe926fb6865bb079bab9ae6c5111700bec Mon Sep 17 00:00:00 2001 From: Bahfir Abbes Date: Wed, 9 Jan 2019 18:47:43 +0100 Subject: [PATCH] simplification --- htdocs/modulebuilder/template/myobject_card.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index b7e37aef62a..87996c9e0c7 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -119,11 +119,11 @@ if (empty($reshook)) $permissiontoadd = $user->rights->mymodule->write; $permissiontodelete = $user->rights->mymodule->delete; + $backurlforlist = dol_buildpath('/mymodule/myobject_list.php',1); if (empty($backtopage)) { - if (empty($id)) $backtopage = dol_buildpath('/mymodule/myobject_list.php',1); + if (empty($id)) $backtopage = $backurlforlist; else $backtopage = dol_buildpath('/mymodule/myobject_card.php',1).($id > 0 ? $id : '__ID__'); - } - $backurlforlist = dol_buildpath('/mymodule/myobject_list.php',1); + } $triggermodname = 'MYMODULE_MYOBJECT_MODIFY'; // Name of trigger action code to execute when we modify record // Actions cancel, add, update, delete or clone