From d4bfb539b7a08e5714c7ca0e507f5a73cee941d2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 14 Feb 2025 08:22:40 +0100 Subject: [PATCH] eval parameter 'order' in config settings for select menus --- views/bootstrap/class.Settings.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index f8dd86740..c3f4f9dab 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -693,9 +693,10 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk)) case 'select': $allowempty = empty($conf['allow_empty']) ? false : $conf['allow_empty']; $multiple = empty($conf['multiple']) ? false : $conf['multiple']; + $order = empty($conf['order']) ? '' : $conf['order']; if(!empty($conf['options'])) { $selections = empty($settings->_extensions[$extname][$confkey]) ? array() : explode(",", $settings->_extensions[$extname][$confkey]); - echo ""; if(is_array($conf['options'])) { $options = $conf['options']; } elseif(is_string($conf['options']) && $conf['options'] == 'hook') { @@ -709,7 +710,12 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk)) echo ""; + if(is_array($opt)) { + echo " data-subtitle=\"".htmlspecialchars($opt['subtitle'])."\">".htmlspecialchars($opt['value']); + } else { + echo ">".htmlspecialchars(getMLText($extname.'_'.$opt, array(), $opt)); + } + echo ""; } echo ""; } elseif(!empty($conf['internal'])) {