From a781c3781c683a75111b2129c5f2f08f89a7b603 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Bernigaud?= <come.bernigaud@opensides.be> Date: Wed, 12 Nov 2014 10:52:43 +0100 Subject: [PATCH] Fixes #2919 Fixing debug level handling in new setup --- contrib/fusiondirectory.conf | 2 +- setup/class_setup.inc | 7 ++++++- setup/class_setupStep_Finish.inc | 6 ++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/contrib/fusiondirectory.conf b/contrib/fusiondirectory.conf index 91dede14d..9b669a8e9 100644 --- a/contrib/fusiondirectory.conf +++ b/contrib/fusiondirectory.conf @@ -33,7 +33,7 @@ forceSSL="FALSE" {/if} templateCompileDirectory="{$templateCompileDirectory}" - debugLevel="{$cv.fdDebugLevel}" + debugLevel="{$cv.debugLevel}" > <!-- Location definition --> diff --git a/setup/class_setup.inc b/setup/class_setup.inc index eda49fc38..5c69b2328 100644 --- a/setup/class_setup.inc +++ b/setup/class_setup.inc @@ -303,7 +303,7 @@ class setup $cv['fdLogging'] = FALSE; $cv['fdDisplayErrors'] = FALSE; $cv['fdForceSSL'] = TRUE; - $cv['fdDebugLevel'] = 0; + $cv['debugLevel'] = 0; $smarty->assign("cv", xmlentities($cv)); $smarty->assign("config_checksum", md5(file_get_contents(CONFIG_TEMPLATE_DIR.CONFIG_FILE))); $smarty->assign("templateCompileDirectory", SPOOL_DIR); @@ -314,5 +314,10 @@ class setup load_plist(); $this->o_steps[$this->i_config] = new Step_Config($this->captured_values); } + + function getDebugLevel () + { + return $this->o_steps[$this->i_config]->attributesAccess['fdDebugLevel']->computeLdapValue(); + } } ?> diff --git a/setup/class_setupStep_Finish.inc b/setup/class_setupStep_Finish.inc index 7a4f2a883..2e0dd94a7 100644 --- a/setup/class_setupStep_Finish.inc +++ b/setup/class_setupStep_Finish.inc @@ -44,8 +44,10 @@ class Step_Finish extends setupStep function get_conf_data() { - $smarty = get_smarty(); - $smarty->assign('cv', xmlentities($this->parent->captured_values)); + $smarty = get_smarty(); + $cv = $this->parent->captured_values; + $cv['debugLevel'] = $this->parent->getDebugLevel(); + $smarty->assign('cv', xmlentities($cv)); $smarty->assign('config_checksum', md5(file_get_contents(CONFIG_TEMPLATE_DIR.CONFIG_FILE))); $smarty->assign('templateCompileDirectory', SPOOL_DIR); return $smarty->fetch(CONFIG_TEMPLATE_DIR.CONFIG_FILE); -- GitLab