fixed config_load to only load defaults with no section defined

This commit is contained in:
monte.ohrt
2011-03-08 16:14:38 +00:00
parent 9d1b0abe5c
commit 3e0c5e06b1
2 changed files with 14 additions and 10 deletions

View File

@@ -1,4 +1,6 @@
===== SVN trunk =====
08/03/2011
- bugfix loading config file without section should load only defaults
03/03/2011
- bugfix "smarty" template variable was not recreated when cached templated had expired
- bugfix internal rendered_content must be cleared after subtemplate was included

View File

@@ -272,8 +272,9 @@ class Smarty_Internal_Config {
}
}
// scan sections
if(!empty($sections)) {
foreach ($_config_vars['sections'] as $this_section => $dummy) {
if ($sections == null || in_array($this_section, (array)$sections)) {
if (in_array($this_section, (array)$sections)) {
foreach ($_config_vars['sections'][$this_section]['vars'] as $variable => $value) {
if ($this->smarty->config_overwrite || !isset($scope_ptr->config_vars[$variable])) {
$scope_ptr->config_vars[$variable] = $value;
@@ -285,4 +286,5 @@ class Smarty_Internal_Config {
}
}
}
}
?>