From 58d633903e210367769c00d42f84a988f3c89a72 Mon Sep 17 00:00:00 2001 From: aofc Date: Tue, 30 Jun 2026 08:19:31 -0400 Subject: [PATCH 1/2] Refactor tag replacement logic in interactQuery class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correction du bogue affectant les tags passés en arguments à un scénario --- core/class/interactQuery.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/class/interactQuery.class.php b/core/class/interactQuery.class.php index ae9c8c462f..5d3e990cf2 100644 --- a/core/class/interactQuery.class.php +++ b/core/class/interactQuery.class.php @@ -830,7 +830,8 @@ public function executeAndReply($_parameters) { $cron->setSchedule(cron::convertDateToCron($executeDate)); $cron->save(); $replace['#valeur#'] = date('Y-m-d H:i:s', $executeDate); - $result = scenarioExpression::setTags(str_replace(array_keys($replace), $replace, $reply)); + $tmpReply = str_replace(array_keys($replace), $replace, $reply); + $result = scenarioExpression::setTags($tmpReply); return $result; } $replace['#valeur#'] = ''; @@ -869,7 +870,8 @@ public function executeAndReply($_parameters) { if (isset($options['tags'])) { $options['tags'] = arg2array($options['tags']); foreach ($options['tags'] as $key => $value) { - $tags['#' . trim(trim($key), '#') . '#'] = scenarioExpression::setTags(trim($value)); + $tmpValue = trim($value); + $tags['#' . trim(trim($key), '#') . '#'] = scenarioExpression::setTags($tmpValue); } } $options['tags'] = array_merge($replace, $tags); From 1d054efb16c256d1a3f3782900b8e15c7fbf8874 Mon Sep 17 00:00:00 2001 From: Salvialf <48010158+Salvialf@users.noreply.github.com> Date: Tue, 30 Jun 2026 15:25:37 +0200 Subject: [PATCH 2/2] Update core/class/interactQuery.class.php --- core/class/interactQuery.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/class/interactQuery.class.php b/core/class/interactQuery.class.php index 5d3e990cf2..6039d27c9b 100644 --- a/core/class/interactQuery.class.php +++ b/core/class/interactQuery.class.php @@ -870,8 +870,7 @@ public function executeAndReply($_parameters) { if (isset($options['tags'])) { $options['tags'] = arg2array($options['tags']); foreach ($options['tags'] as $key => $value) { - $tmpValue = trim($value); - $tags['#' . trim(trim($key), '#') . '#'] = scenarioExpression::setTags($tmpValue); + $tags['#' . trim(trim($key), '#') . '#'] = scenarioExpression::setTags($value); } } $options['tags'] = array_merge($replace, $tags);