From a74f5d96682c77265a141b7415be5a8173a9cbd6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 25 Jun 2025 12:57:49 +0200 Subject: [PATCH 1/2] get options before output of select tag --- views/bootstrap/class.Settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 49f16ae36..74430c4e9 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -351,7 +351,6 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style { $order = empty($conf['order']) ? '' : $conf['order']; if(!empty($conf['options'])) { $selections = empty($settings->_extensions[$extname][$confkey]) ? array() : explode(",", $settings->_extensions[$extname][$confkey]); - echo ""; if($allowempty) echo ""; foreach($options as $key=>$opt) { From ac29815974f9749204a1a39efd020b80e473fffd Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 25 Jun 2025 12:58:37 +0200 Subject: [PATCH 2/2] replace array_merge by '+' when combining returned array of hooks --- inc/inc.ClassControllerCommon.php | 2 +- inc/inc.ClassViewCommon.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/inc.ClassControllerCommon.php b/inc/inc.ClassControllerCommon.php index 0203d9b48..ea7b958a9 100644 --- a/inc/inc.ClassControllerCommon.php +++ b/inc/inc.ClassControllerCommon.php @@ -285,7 +285,7 @@ class SeedDMS_Controller_Common { if(is_string($tmpret)) { $ret = ($ret === null) ? $tmpret : (is_string($ret) ? $ret.$tmpret : array_merge($ret, array($tmpret))); } elseif(is_array($tmpret)) { // || is_object($tmpret)) { - $ret = ($ret === null) ? $tmpret : (is_string($ret) ? array_merge(array($ret), $tmpret) : array_merge($ret, $tmpret)); + $ret = ($ret === null) ? $tmpret : (is_string($ret) ? (array($ret) + $tmpret) : ($ret + $tmpret)); } else $ret = $tmpret; } diff --git a/inc/inc.ClassViewCommon.php b/inc/inc.ClassViewCommon.php index b63b2ef2e..b7557f5f5 100644 --- a/inc/inc.ClassViewCommon.php +++ b/inc/inc.ClassViewCommon.php @@ -213,7 +213,7 @@ class SeedDMS_View_Common { if(is_string($tmpret)) { $ret = ($ret === null) ? $tmpret : (is_string($ret) ? $ret.$tmpret : array_merge($ret, array($tmpret))); } elseif(is_array($tmpret) || is_object($tmpret)) { - $ret = ($ret === null) ? $tmpret : (is_string($ret) ? array_merge(array($ret), $tmpret) : array_merge($ret, $tmpret)); + $ret = ($ret === null) ? $tmpret : (is_string($ret) ? (array($ret) + $tmpret) : ($ret + $tmpret)); } else $ret = $tmpret; }