From 9d31d6448c3c19acaea2e8a109ff52f6a1c78775 Mon Sep 17 00:00:00 2001 From: John BOTELLA Date: Wed, 25 May 2022 09:59:45 +0200 Subject: [PATCH] Fix btn confirm url --- htdocs/core/lib/functions.lib.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 43a549655b9..93fbf98e81b 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -10043,9 +10043,11 @@ function dolGetButtonAction($label, $html = '', $actionType = 'default', $url = // Js Confirm button if ($userRight && !empty($params['confirm'])) { if (!is_array($params['confirm'])) { - $params['confirm'] = array( - 'url' => $url . (strpos($url, '?') > 0 ? '&' : '?') . 'confirm=yes' - ); + $params['confirm'] = array(); + } + + if (empty($params['confirm'])) { + $params['confirm']['url'] = $url . (strpos($url, '?') > 0 ? '&' : '?') . 'confirm=yes'; } // for js desabled compatibility set $url as call to confirm action and $params['confirm']['url'] to confirmed action