From 4065c5c2f185e9fa0f18ef9b600725430332154b Mon Sep 17 00:00:00 2001 From: Flobul Date: Sun, 20 Apr 2025 08:39:39 +0200 Subject: [PATCH 1/3] Use of listValueSelected for select listValue --- core/class/cmd.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/class/cmd.class.php b/core/class/cmd.class.php index 9000d3935f..0933b6a1e1 100644 --- a/core/class/cmd.class.php +++ b/core/class/cmd.class.php @@ -1671,7 +1671,8 @@ public function toHtml($_version = 'dashboard', $_options = '') { $coupleArray = explode('|', $element); $cmdValue = $this->getCmdValue(); if (is_object($cmdValue) && $cmdValue->getType() == 'info') { - if ($cmdValue->execCmd() == $coupleArray[0] || $cmdValue->execCmd() == $coupleArray[1]) { + $keySeclected = intval($this->getConfiguration('listValueSelected', 0)); + if ($cmdValue->execCmd() == $coupleArray[$keySeclected]) { $listOption .= ''; $foundSelect = true; } else { From bb039ffefa0c0891ba9f96995d4e9e6b2aa93409 Mon Sep 17 00:00:00 2001 From: Flobul Date: Sun, 20 Apr 2025 08:40:43 +0200 Subject: [PATCH 2/3] Add listValueSelected in cmd.configure.php --- desktop/modal/cmd.configure.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/desktop/modal/cmd.configure.php b/desktop/modal/cmd.configure.php index 0f3b49fd9d..9ba727fc62 100644 --- a/desktop/modal/cmd.configure.php +++ b/desktop/modal/cmd.configure.php @@ -122,6 +122,12 @@ ?> +
+ +
+ +
+
From 430574c02dea89958f8496429b409f81962412f2 Mon Sep 17 00:00:00 2001 From: Flobul Date: Sun, 20 Apr 2025 09:59:33 +0200 Subject: [PATCH 3/3] Update cmd.class.php --- core/class/cmd.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/class/cmd.class.php b/core/class/cmd.class.php index 0933b6a1e1..e1982fdd3c 100644 --- a/core/class/cmd.class.php +++ b/core/class/cmd.class.php @@ -1671,8 +1671,8 @@ public function toHtml($_version = 'dashboard', $_options = '') { $coupleArray = explode('|', $element); $cmdValue = $this->getCmdValue(); if (is_object($cmdValue) && $cmdValue->getType() == 'info') { - $keySeclected = intval($this->getConfiguration('listValueSelected', 0)); - if ($cmdValue->execCmd() == $coupleArray[$keySeclected]) { + $keySelected = intval($this->getConfiguration('listValueSelected', 0)); + if ($cmdValue->execCmd() == $coupleArray[$keySelected]) { $listOption .= ''; $foundSelect = true; } else {