From caa0e3f139b9e430d8f48ab9ec95b400d75a299f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 29 Oct 2025 11:09:04 +0100 Subject: [PATCH 01/15] add translation service to container --- restapi/index.php | 5 +++++ www/index.php | 1 + 2 files changed, 6 insertions(+) diff --git a/restapi/index.php b/restapi/index.php index d193761c5..7c6894a8e 100644 --- a/restapi/index.php +++ b/restapi/index.php @@ -24,6 +24,7 @@ use Psr\Http\Server\RequestHandlerInterface; use Psr\Http\Server\MiddlewareInterface; use DI\ContainerBuilder; use Slim\Factory\AppFactory; +use Seeddms\Seeddms\Translator; final class JsonRenderer { /* {{{ */ public function json( @@ -3023,6 +3024,7 @@ final class SeedDMS_TestController { /* {{{ */ } public function echoData($request, $response, $args) { /* {{{ */ + $translator = $this->container->get('translator'); return $this->renderer->json($response, ['success'=>true, 'message'=>'This is the result of the echo call.', 'data'=>$args['data']]); } /* }}} */ @@ -3276,6 +3278,9 @@ $container->set('logger', $logger); $container->set('fulltextservice', $fulltextservice); $container->set('notifier', $notifier); $container->set('authenticator', $authenticator); +$translator = new Translator($settings); +$translator->init(); +$container->set('translator', $translator); $app->setBasePath($settings->_httpRoot."restapi/index.php"); diff --git a/www/index.php b/www/index.php index 23f2951da..7cc96955d 100644 --- a/www/index.php +++ b/www/index.php @@ -59,6 +59,7 @@ if (true) { $container->set('fulltextservice', $fulltextservice); $container->set('notifier', $notifier); $container->set('authenticator', $authenticator); + $container->set('translator', $translator); if (isset($GLOBALS['SEEDDMS_HOOKS']['initDMS'])) { foreach ($GLOBALS['SEEDDMS_HOOKS']['initDMS'] as $hookObj) { From 8a6db445c54c92d8aec8364a23f2c670c4cacd17 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 29 Oct 2025 15:39:48 +0100 Subject: [PATCH 02/15] pass translator to notification service --- inc/inc.ClassNotificationService.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassNotificationService.php b/inc/inc.ClassNotificationService.php index edb301018..c9454e10a 100644 --- a/inc/inc.ClassNotificationService.php +++ b/inc/inc.ClassNotificationService.php @@ -41,6 +41,11 @@ class SeedDMS_NotificationService { */ protected $settings; + /* + * Translator + */ + protected $translator; + /* * Possible types of receivers */ @@ -52,11 +57,12 @@ class SeedDMS_NotificationService { const RECV_WORKFLOW = 5; const RECV_UPLOADER = 6; - public function __construct($logger = null, $settings = null) { /* {{{ */ + public function __construct($logger = null, $settings = null, $translator=null) { /* {{{ */ $this->services = array(); $this->errors = array(); $this->logger = $logger; $this->settings = $settings; + $this->translator = $translator; } /* }}} */ public function addService($service, $name='') { /* {{{ */ @@ -66,6 +72,10 @@ class SeedDMS_NotificationService { $this->errors[$name] = true; } /* }}} */ + public function getTranslator() { /* {{{ */ + return $this->translator; + } /* }}} */ + public function getServices() { /* {{{ */ return $this->services; } /* }}} */ From cc34c42f7316ca4b674ec3d7acfc23740886a8f2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 29 Oct 2025 15:40:35 +0100 Subject: [PATCH 03/15] pass translator to constructor --- inc/inc.ClassEmailNotify.php | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/inc/inc.ClassEmailNotify.php b/inc/inc.ClassEmailNotify.php index f70a1b8d8..775dbc4c0 100644 --- a/inc/inc.ClassEmailNotify.php +++ b/inc/inc.ClassEmailNotify.php @@ -36,6 +36,8 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify { */ protected $_dms; + protected $_translator; + protected $smtp_server; protected $smtp_port; @@ -52,8 +54,9 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify { protected $debug; - function __construct($dms, $from_address='', $smtp_server='', $smtp_port='', $smtp_username='', $smtp_password='', $lazy_ssl=true, $force_from=false) { /* {{{ */ + function __construct($dms, $translator, $from_address='', $smtp_server='', $smtp_port='', $smtp_username='', $smtp_password='', $lazy_ssl=true, $force_from=false) { /* {{{ */ $this->_dms = $dms; + $this->_translator = $translator; $this->smtp_server = $smtp_server; $this->smtp_port = $smtp_port; $this->smtp_user = $smtp_username; @@ -126,38 +129,38 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify { $body = ''; if(!isset($params['__skip_header__']) || !$params['__skip_header__']) { if(!isset($params['__header__'])) - $body .= getMLText("email_header", $params, "", $lang)."\r\n\r\n"; + $body .= $this->_translator->translate("email_header", $params, "", $lang)."\r\n\r\n"; elseif($params['__header__']) - $body .= getMLText($params['__header__'], $params, "", $lang)."\r\n\r\n"; + $body .= $this->_translator->translate($params['__header__'], $params, "", $lang)."\r\n\r\n"; } if(isset($params['__body__'])) $body .= $params['__body__']; else - $body .= getMLText($messagekey, $params, "", $lang); + $body .= $this->_translator->translate($messagekey, $params, "", $lang); if(!isset($params['__skip_footer__']) || !$params['__skip_footer__']) { if(!isset($params['__footer__'])) - $body .= "\r\n\r\n".getMLText("email_footer", $params, "", $lang); + $body .= "\r\n\r\n".$this->_translator->translate("email_footer", $params, "", $lang); elseif($params['__footer__']) - $body .= "\r\n\r\n".getMLText($params['__footer__'], $params, "", $lang); + $body .= "\r\n\r\n".$this->_translator->translate($params['__footer__'], $params, "", $lang); } $bodyhtml = ''; - if(isset($params['__body_html__']) || getMLText($messagekey.'_html', $params, "", $lang)) { + if(isset($params['__body_html__']) || $this->_translator->translate($messagekey.'_html', $params, "", $lang)) { if(!isset($params['__skip_header__']) || !$params['__skip_header__']) { if(!isset($params['__header_html__'])) - $bodyhtml .= getMLText("email_header_html", $params, "", $lang)."\r\n\r\n"; + $bodyhtml .= $this->_translator->translate("email_header_html", $params, "", $lang)."\r\n\r\n"; elseif($params['__header_html__']) - $bodyhtml .= getMLText($params['__header_html__'], $params, "", $lang)."\r\n\r\n"; + $bodyhtml .= $this->_translator->translate($params['__header_html__'], $params, "", $lang)."\r\n\r\n"; } if(isset($params['__body_html__'])) $bodyhtml .= $params['__body_html__']; else - $bodyhtml .= getMLText($messagekey.'_html', $params, "", $lang); + $bodyhtml .= $this->_translator->translate($messagekey.'_html', $params, "", $lang); if(!isset($params['__skip_footer__']) || !$params['__skip_footer__']) { if(!isset($params['__footer_html__'])) - $bodyhtml .= "\r\n\r\n".getMLText("email_footer_html", $params, "", $lang); + $bodyhtml .= "\r\n\r\n".$this->_translator->translate("email_footer_html", $params, "", $lang); elseif($params['__footer_html__']) - $bodyhtml .= "\r\n\r\n".getMLText($params['__footer_html__'], $params, "", $lang); + $bodyhtml .= "\r\n\r\n".$this->_translator->translate($params['__footer_html__'], $params, "", $lang); } } @@ -207,7 +210,7 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify { $headers['Return-Path'] = $returnpath; $headers['To'] = $to; $preferences = array("input-charset" => "UTF-8", "output-charset" => "UTF-8", "scheme"=>"Q"); - $encoded_subject = iconv_mime_encode("Subject", getMLText($subject, $params, null, $lang), $preferences); + $encoded_subject = iconv_mime_encode("Subject", $this->_translator->translate($subject, $params, null, $lang), $preferences); $headers['Subject'] = substr($encoded_subject, strlen('Subject: ')); $headers['Date'] = date('r', time()); $headers['MIME-Version'] = "1.0"; @@ -240,7 +243,7 @@ class SeedDMS_EmailNotify extends SeedDMS_Notify { if (isset($GLOBALS['SEEDDMS_HOOKS']['mailqueue'])) { foreach($GLOBALS['SEEDDMS_HOOKS']['mailqueue'] as $queueService) { if(method_exists($queueService, 'queueMailJob')) { - $ret = $queueService->queueMailJob($mail_params, $to, $hdrs, getMLText($subject, $params, "", $lang), $message); + $ret = $queueService->queueMailJob($mail_params, $to, $hdrs, $this->_translator->translate($subject, $params, "", $lang), $message); if($ret !== null) return $ret; } From 73ee5781dd1d7f56b6ddf7fb92398045c48fe3b4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 29 Oct 2025 15:41:16 +0100 Subject: [PATCH 04/15] show a different error msg when php_sapi == cli --- inc/inc.ClassSettings.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 2722e07b3..0010964d3 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -418,7 +418,10 @@ class Settings { /* {{{ */ // Load config file if (!defined("SEEDDMS_INSTALL")) { if(!file_exists($configFilePath)) { - echo "You do not seem to have a valid configuration. Run the install tool first."; + if(php_sapi_name() === 'cli') + echo "You do not seem to have a valid configuration. Set SEEDDMS_CONFIG_FILE to the path of the configuration file.\n"; + else + echo "You do not seem to have a valid configuration. Run the install tool first."; exit; } } From a976d0bd2270fc325fd280ca42ccd1a8ac134e3f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 29 Oct 2025 15:43:10 +0100 Subject: [PATCH 05/15] move getAvailableLanguages() and getLanguages() from translator --- inc/inc.ClassSettings.php | 56 ++++++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 16 deletions(-) diff --git a/inc/inc.ClassSettings.php b/inc/inc.ClassSettings.php index 0010964d3..937f79ab6 100644 --- a/inc/inc.ClassSettings.php +++ b/inc/inc.ClassSettings.php @@ -431,17 +431,14 @@ class Settings { /* {{{ */ echo "Your configuration contains errors."; exit; } - -// if (!is_null($this->_maxExecutionTime)) -// ini_set("max_execution_time", $this->_maxExecutionTime); } /* }}} */ /** - * Check if a variable has the string 'true', 'on', 'yes' or 'y' - * and returns true. + * Check if the passed parameter equals to 'true', 'on', 'yes' or 'y' + * and returns true, if it does. * * @param string $var value - * @return true/false + * @return boolean true if $var is 'true', 'on', 'yes' or 'y', otherwise false */ protected static function boolVal($var) { /* {{{ */ $var = strtolower(strval($var)); @@ -459,10 +456,10 @@ class Settings { /* {{{ */ } /* }}} */ /** - * Return ';' seperated string from array + * Create ';' seperated string from array * * @param array $value - * + * @return string */ function arrayToString($value) { /* {{{ */ return implode(";", $value); @@ -472,14 +469,14 @@ class Settings { /* {{{ */ * Return array from ';' seperated string * * @param string $value - * + * @return array */ function stringToArray($value) { /* {{{ */ return explode(";", $value); } /* }}} */ /** - * set $_viewOnlineFileTypes + * Set $_viewOnlineFileTypes * * @param string $stringValue string value * @@ -489,7 +486,7 @@ class Settings { /* {{{ */ } /* }}} */ /** - * get $_viewOnlineFileTypes in a string value + * Get $_viewOnlineFileTypes in a string value * * @return string value * @@ -499,7 +496,7 @@ class Settings { /* {{{ */ } /* }}} */ /** - * set $_editOnlineFileTypes + * Set $_editOnlineFileTypes * * @param string $stringValue string value * @@ -509,7 +506,7 @@ class Settings { /* {{{ */ } /* }}} */ /** - * get $_editOnlineFileTypes in a string value + * Get $_editOnlineFileTypes in a string value * * @return string value * @@ -522,8 +519,7 @@ class Settings { /* {{{ */ * Load config file * * @param string $configFilePath config file path - * - * @return true/false + * @return boolean true, if loading was successful, otherwise false */ public function load($configFilePath) { /* {{{ */ $contents = file_get_contents($configFilePath); @@ -1304,7 +1300,7 @@ class Settings { /* {{{ */ // Save return $xml->asXML($configFilePath); - } /* }}} */ + } /* }}} */ /** * search and return Config File Path @@ -1855,5 +1851,33 @@ class Settings { /* {{{ */ return $this->getBaseUrl().$this->_httpRoot; } /* }}} */ + public function getAvailableLanguages() { /* {{{ */ + $languages = array(); + + $path = $this->_rootDir . "languages/"; + $handle = opendir($path); + + while ($entry = readdir($handle) ) + { + if ($entry == ".." || $entry == ".") { + continue; + } elseif (is_dir($path . $entry)) { + array_push($languages, $entry); + } + } + closedir($handle); + + asort($languages); + return $languages; + } /* }}} */ + + function getLanguages() { /* {{{ */ + if($this->_availablelanguages) { + return $this->_availablelanguages; + } + + return getAvailableLanguages(); + } /* }}} */ + } /* }}} */ From b4ced679d0c4943bc4c842b172bd0771afa5ec01 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 29 Oct 2025 15:43:54 +0100 Subject: [PATCH 06/15] move getAvailableLanguages() and getLanguages() into Settings --- inc/inc.ClassTranslator.php | 32 +++----------------------------- 1 file changed, 3 insertions(+), 29 deletions(-) diff --git a/inc/inc.ClassTranslator.php b/inc/inc.ClassTranslator.php index feda07b1d..66ed30927 100644 --- a/inc/inc.ClassTranslator.php +++ b/inc/inc.ClassTranslator.php @@ -13,6 +13,8 @@ namespace Seeddms\Seeddms; +use SeedDMS_Core_AttributeDefinition; + /** * Class for translation and language handling * @@ -50,7 +52,7 @@ class Translator { /* {{{ */ } /* }}} */ public function init() { /* {{{ */ - $__languages = $this->getLanguages(); + $__languages = $this->settings->getLanguages(); if(!in_array($this->settings->_language, $__languages)) $__languages[] = $this->settings->_language; foreach($__languages as $_lang) { @@ -68,34 +70,6 @@ class Translator { /* {{{ */ $this->lang[$lang] = $data; } /* }}} */ - function getAvailableLanguages() { /* {{{ */ - $languages = array(); - - $path = $this->settings->_rootDir . "languages/"; - $handle = opendir($path); - - while ($entry = readdir($handle) ) - { - if ($entry == ".." || $entry == ".") { - continue; - } elseif (is_dir($path . $entry)) { - array_push($languages, $entry); - } - } - closedir($handle); - - asort($languages); - return $languages; - } /* }}} */ - - function getLanguages() { /* {{{ */ - if($this->settings->_availablelanguages) { - return $this->settings->_availablelanguages; - } - - return getAvailableLanguages(); - } /* }}} */ - /** * Get translation * From 767235f0f5f820fcc6127d53b0ffe864b538cffe Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 29 Oct 2025 15:44:44 +0100 Subject: [PATCH 07/15] pass translator to notification service and services --- inc/inc.Notification.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/inc.Notification.php b/inc/inc.Notification.php index 86eab8cbe..400740d9b 100644 --- a/inc/inc.Notification.php +++ b/inc/inc.Notification.php @@ -12,7 +12,7 @@ * @version Release: @package_version@ */ -$notifier = new SeedDMS_NotificationService($logger, $settings); +$notifier = new SeedDMS_NotificationService($logger, $settings, $translator); if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) { foreach($GLOBALS['SEEDDMS_HOOKS']['notification'] as $notificationObj) { @@ -23,7 +23,7 @@ if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) { } if($settings->_enableEmail) { - $notifier->addService(new SeedDMS_EmailNotify($dms, $settings->_smtpSendFrom, $settings->_smtpServer, $settings->_smtpPort, $settings->_smtpUser, $settings->_smtpPassword, $settings->_smtpLazySSL, $settings->_smtpForceFrom), 'email'); + $notifier->addService(new SeedDMS_EmailNotify($dms, $translator, $settings->_smtpSendFrom, $settings->_smtpServer, $settings->_smtpPort, $settings->_smtpUser, $settings->_smtpPassword, $settings->_smtpLazySSL, $settings->_smtpForceFrom), 'email'); } if(isset($GLOBALS['SEEDDMS_HOOKS']['notification'])) { From de1a87380b48a49a62eded901dc2e191a0723beb Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 29 Oct 2025 15:45:15 +0100 Subject: [PATCH 08/15] $extMgr is no called $extMgr --- out/out.ExtensionMgr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/out/out.ExtensionMgr.php b/out/out.ExtensionMgr.php index e0f47ca25..faec782b1 100644 --- a/out/out.ExtensionMgr.php +++ b/out/out.ExtensionMgr.php @@ -49,7 +49,7 @@ if($view) { $view->setParam('extdir', $settings->_rootDir."/ext"); $view->setParam('version', $v); $view->setParam('accessobject', $accessop); - $view->setParam('extmgr', $extMgr); + $view->setParam('extmgr', $extmgr); $view->setParam('currenttab', $currenttab); $view->setParam('extname', $extname); $view($_GET); From 7384d1db4a7d7042d105e2051e5bec1876ed5e03 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 29 Oct 2025 15:45:54 +0100 Subject: [PATCH 09/15] pass translator ot constructor of SeedDMS_EmailNotify --- op/op.Ajax.php | 2 +- op/op.PasswordForgotten.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/op/op.Ajax.php b/op/op.Ajax.php index 27dbd88ce..b14375ddb 100644 --- a/op/op.Ajax.php +++ b/op/op.Ajax.php @@ -290,7 +290,7 @@ switch($command) { case 'testmail': /* {{{ */ if($user && $user->isAdmin()) { if($user->getEmail()) { - $emailobj = new SeedDMS_EmailNotify($dms, $settings->_smtpSendFrom, $settings->_smtpServer, $settings->_smtpPort, $settings->_smtpUser, $settings->_smtpPassword, $settings->_smtpLazySSL, $settings->_smtpForceFrom); + $emailobj = new SeedDMS_EmailNotify($dms, $translator, $settings->_smtpSendFrom, $settings->_smtpServer, $settings->_smtpPort, $settings->_smtpUser, $settings->_smtpPassword, $settings->_smtpLazySSL, $settings->_smtpForceFrom); $emailobj->setDebug(true); $params = array(); $params['url'] = getBaseUrl().$settings->_httpRoot; diff --git a/op/op.PasswordForgotten.php b/op/op.PasswordForgotten.php index c1e8e0fb9..a4c111f76 100644 --- a/op/op.PasswordForgotten.php +++ b/op/op.PasswordForgotten.php @@ -45,7 +45,7 @@ if (empty($email) || empty($login)) { $user = $dms->getUserByLogin($login, $email); if($user) { if($hash = $dms->createPasswordRequest($user)) { - $emailobj = new SeedDMS_EmailNotify($dms, $settings->_smtpSendFrom, $settings->_smtpServer, $settings->_smtpPort, $settings->_smtpUser, $settings->_smtpPassword); + $emailobj = new SeedDMS_EmailNotify($dms, $translator, $settings->_smtpSendFrom, $settings->_smtpServer, $settings->_smtpPort, $settings->_smtpUser, $settings->_smtpPassword); $subject = "password_forgotten_email_subject"; $message = "password_forgotten_email_body"; $params = array(); From bc1fb05a41eb4f02e1b1b8c28c19bd4749afdf2b Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 29 Oct 2025 15:47:34 +0100 Subject: [PATCH 10/15] include inc/inc.Language.php --- out/out.UserImage.php | 1 + 1 file changed, 1 insertion(+) diff --git a/out/out.UserImage.php b/out/out.UserImage.php index 3f0378472..dfb8f0189 100644 --- a/out/out.UserImage.php +++ b/out/out.UserImage.php @@ -22,6 +22,7 @@ if(!isset($settings)) require_once("../inc/inc.Settings.php"); require_once("inc/inc.Utils.php"); require_once("inc/inc.LogInit.php"); +require_once("inc/inc.Language.php"); require_once("inc/inc.Init.php"); require_once("inc/inc.Extension.php"); require_once("inc/inc.DBInit.php"); From bee91325ca7d00a977a6afa863db4e6e65d18672 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 29 Oct 2025 15:48:07 +0100 Subject: [PATCH 11/15] $extMgr is now called $extmgr --- out/out.Info.php | 5 +---- out/out.Settings.php | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/out/out.Info.php b/out/out.Info.php index 7376f7cbd..91f11208f 100644 --- a/out/out.Info.php +++ b/out/out.Info.php @@ -54,14 +54,11 @@ if(@ini_get('allow_url_fopen') == '1') { } } -//$reposurl = $settings->_repositoryUrl; -//$extMgr = new SeedDMS_Extension_Mgr($settings->_rootDir."/ext", $settings->_cacheDir, $reposurl); - if($view) { $view->setParam('version', $v); $view->setParam('availversions', $versions); $view->setParam('accessobject', $accessop); - $view->setParam('extmgr', $extMgr); + $view->setParam('extmgr', $extmgr); $view($_GET); exit; } diff --git a/out/out.Settings.php b/out/out.Settings.php index 9e20ea4de..7bcdda48a 100644 --- a/out/out.Settings.php +++ b/out/out.Settings.php @@ -40,7 +40,7 @@ $groups = $dms->getAllGroups(); if($view) { $view->setParam('settings', $settings); - $view->setParam('extmgr', $extMgr); + $view->setParam('extmgr', $extmgr); $view->setParam('currenttab', (isset($_REQUEST['currenttab']) ? $_REQUEST['currenttab'] : '')); $view->setParam('extname', (isset($_REQUEST['extensionname']) ? $_REQUEST['extensionname'] : '')); $view->setParam('allusers', $users); From d4265e65f85b1433d86757432d57adb81609aa1c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 29 Oct 2025 15:48:43 +0100 Subject: [PATCH 12/15] getAvailableLanguages() is now a method of Settings --- views/bootstrap/class.Settings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Settings.php b/views/bootstrap/class.Settings.php index 6e46f57de..d1829f4e7 100644 --- a/views/bootstrap/class.Settings.php +++ b/views/bootstrap/class.Settings.php @@ -634,8 +634,8 @@ $this->showStartPaneContent('site', (!$currenttab || $currenttab == 'site')); showConfigText('settings_siteName', 'siteName'); ?> showConfigText('settings_footNote', 'footNote'); ?> showConfigCheckbox('settings_printDisclaimer', 'printDisclaimer'); ?> -showConfigOption('settings_available_languages', 'availablelanguages', getAvailableLanguages(), true, true); ?> -showConfigOption('settings_language', 'language', getAvailableLanguages(), false, true); ?> +showConfigOption('settings_available_languages', 'availablelanguages', $settings->getAvailableLanguages(), true, true); ?> +showConfigOption('settings_language', 'language', $settings->getAvailableLanguages(), false, true); ?> showConfigText('settings_dateformat', 'dateformat'); ?> showConfigText('settings_datetimeformat', 'datetimeformat'); ?> showConfigOption('settings_theme', 'theme', UI::getStyles(), false, false); ?> From de354330910270d9d7491fe3ed7eae7c59dd1ecc Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 29 Oct 2025 15:49:20 +0100 Subject: [PATCH 13/15] show path of configuration file --- views/bootstrap/class.Info.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.Info.php b/views/bootstrap/class.Info.php index 5fd4b1131..c91e0ee36 100644 --- a/views/bootstrap/class.Info.php +++ b/views/bootstrap/class.Info.php @@ -62,8 +62,9 @@ class SeedDMS_View_Info extends SeedDMS_Theme_Style { $dbversion = $dms->getDBVersion(); echo "".getMLText('seeddms_version')."".$version->version()."\n"; if($user->isAdmin()) { - $storage = $dms->getStorage(); echo "".getMLText('database_schema_version')."".$dbversion['major'].".".$dbversion['minor'].".".$dbversion['subminor']."\n"; + echo "".getMLText('configuration_file')."".$settings->_configFilePath."\n"; + $storage = $dms->getStorage(); echo "".getMLText('storage')."".($storage ? $storage->info() : "legacy")."\n"; } echo "\n\n"; From 00360800c35f4f5f63758cc58486257329bea11e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 29 Oct 2025 15:50:59 +0100 Subject: [PATCH 14/15] getLanguages() is now a method of class Settings --- views/bootstrap/class.Bootstrap.php | 2 +- views/bootstrap4/class.Bootstrap4.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 19f8c43ae..0a6058f26 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -384,7 +384,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);; echo "
  • \n"; echo " ".getMLText("language")."\n"; echo "