From 6af41552f09d11bbe6ddb2bbf2c4eb1e869fd433 Mon Sep 17 00:00:00 2001 From: stephan Date: Thu, 17 Dec 2020 21:23:09 +0100 Subject: [PATCH] Version 0.9.5 beta - made the module configurations environment possible, now the module configuration can also be different dependent on the APPLICATION_ENV, added a possible VALUE for a div layer so HTML code can also be added inside the form elements. --- core/c/registry.php | 11 ++++++++++- core/c/typeopendiv.php | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/core/c/registry.php b/core/c/registry.php index cd648bf..f068ca2 100644 --- a/core/c/registry.php +++ b/core/c/registry.php @@ -68,8 +68,17 @@ final class Registry { if(strstr($settings->getPathName(), self::CONFIG_SETTINGS_KEY) && $settings->getFileName()!='.' && $settings->getFileName()!='..') { + + $config_ini_name = basename($settings->getPathName()); + $ini_file = explode('.', $config_ini_name); + $ini_file = $ini_file[0] . '.' . Config::getEnv() . '.' . $ini_file[1]; + $ini_file = str_replace($config_ini_name, $ini_file, $settings->getPathName()) . "
"; + if(!file_exists($ini_file)) + { + $ini_file = $settings->getPathName(); + } $module = new \stdClass(); - $module_settings = parse_ini_file($settings->getPathName(), true); + $module_settings = parse_ini_file($ini_file, true); if(array_key_exists(strtoupper($this->getModuleName()), $module_settings)) { foreach ($module_settings[strtoupper($this->getModuleName())] as $key=>$value) diff --git a/core/c/typeopendiv.php b/core/c/typeopendiv.php index f8fa437..937194f 100644 --- a/core/c/typeopendiv.php +++ b/core/c/typeopendiv.php @@ -33,6 +33,6 @@ class TypeOpenDiv extends FormAttributes implements IForm */ private function _setElement( ) { - $this->_element = '
' . "\n"; + $this->_element = '
' . 'VALUE' . "\n"; } } \ No newline at end of file