From c62a2fb97ecf30d872167bc2c4b88e84c65f8729 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Sun, 11 Dec 2016 15:21:06 +0100 Subject: [PATCH 1/2] Best fix of cancel edit line --- htdocs/commande/card.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index b340fc52b98..33ad87d4f7f 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -116,9 +116,11 @@ if (empty($reshook)) $urltogo=$backtopage?$backtopage:dol_buildpath('/commande/list.php',1); header("Location: ".$urltogo); exit; - } - if ($id > 0 || ! empty($ref)) $ret = $object->fetch($id,$ref); - $action=''; + } + else { + header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $id); // Pour reaffichage de la fiche en cours d'edition + exit(); + } } include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once From 7915021495df58f51662c49d85f10f9f986e8a6a Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Sun, 11 Dec 2016 15:23:07 +0100 Subject: [PATCH 2/2] Best fix of cancel edit line --- htdocs/commande/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 33ad87d4f7f..5264867992d 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -117,8 +117,8 @@ if (empty($reshook)) header("Location: ".$urltogo); exit; } - else { - header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $id); // Pour reaffichage de la fiche en cours d'edition + else { + header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $id); exit(); } }