From fe5a2d1adde6b6abff52bd6aef0d15ace1c3cbf6 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 7 Sep 2024 19:25:07 +0200 Subject: [PATCH 1/3] set requesturi --- inc/inc.ClassUI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/inc.ClassUI.php b/inc/inc.ClassUI.php index 16730f2f5..4ef18e5a8 100644 --- a/inc/inc.ClassUI.php +++ b/inc/inc.ClassUI.php @@ -128,7 +128,7 @@ class UI extends UI_Default { $view = new $classname($params, $theme); /* Set some configuration parameters */ $view->setParam('referer', isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''); - $view->setParam('refferer', $_SERVER['REQUEST_URI']); + $view->setParam('requesturi', $_SERVER['REQUEST_URI']); $view->setParam('absbaseprefix', $settings->_httpRoot.$httpbasedir); $view->setParam('theme', $theme); $view->setParam('class', $class); From 74af17c0203634a0e50934e8dd6019b31b86bcab Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 7 Sep 2024 19:26:30 +0200 Subject: [PATCH 2/3] showConfigText() checks if translation for _placeholder exists --- views/bootstrap/class.Settings.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 3b8399214..6571f4287 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -115,7 +115,11 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style { /** * Show a text input configuration option * - * @param string $title title of the option + * The parameter $title is the key of the language phrase. {$title}_desc + * is the description and {$title}_placeholder will be used as placeholder, + * if $placeholder is not set. + * + * @param string $title title key of the option * @param string $name name of html input field * @param string $type can be 'password', 'array' * @param string $placeholder placeholder for input field @@ -132,7 +136,7 @@ class SeedDMS_View_Settings extends SeedDMS_Theme_Style { $value = $settings->{"_".$name}; echo " "; if($this->isVisible($name)) - $this->showTextField($name, $value, ($type=='password' || $type=='textarea' ? $type : ''), $placeholder); + $this->showTextField($name, $value, ($type=='password' || $type=='textarea' ? $type : ''), $placeholder ? $placeholder : getMLText($title."_placeholder", [], "")); else echo getMLText('settings_conf_field_not_editable'); echo "\n"; From 62ce0e74402218639a1de4ae525cb7bfa1857b35 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Sat, 7 Sep 2024 19:26:44 +0200 Subject: [PATCH 3/3] set placeholder of baseUrl to getBaseUrl() --- views/bootstrap/class.Settings.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 6571f4287..c0ba2cb44 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -462,7 +462,7 @@ if(($kkk = $this->callHook('getFullSearchEngine')) && is_array($kkk)) --> showConfigHeadline('settings_Server'); ?> showConfigText('settings_rootDir', 'rootDir'); ?> -showConfigText('settings_baseUrl', 'baseUrl'); ?> +showConfigText('settings_baseUrl', 'baseUrl', '', getBaseUrl()); ?> showConfigText('settings_httpRoot', 'httpRoot'); ?> showConfigText('settings_contentDir', 'contentDir'); ?> showConfigText('settings_backupDir', 'backupDir'); ?> @@ -837,4 +837,13 @@ if(is_writeable($settings->_configFilePath)) { $this->htmlEndPage(); } /* }}} */ } -?> + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: t + * End: + * vim600: fdm=marker + * vim: noet sw=2 ts=2 + */