mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 03:14:27 +02:00
fixed config_load to only load defaults with no section defined
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
===== SVN trunk =====
|
===== SVN trunk =====
|
||||||
|
08/03/2011
|
||||||
|
- bugfix loading config file without section should load only defaults
|
||||||
03/03/2011
|
03/03/2011
|
||||||
- bugfix "smarty" template variable was not recreated when cached templated had expired
|
- bugfix "smarty" template variable was not recreated when cached templated had expired
|
||||||
- bugfix internal rendered_content must be cleared after subtemplate was included
|
- bugfix internal rendered_content must be cleared after subtemplate was included
|
||||||
|
@@ -272,16 +272,18 @@ class Smarty_Internal_Config {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// scan sections
|
// scan sections
|
||||||
foreach ($_config_vars['sections'] as $this_section => $dummy) {
|
if(!empty($sections)) {
|
||||||
if ($sections == null || in_array($this_section, (array)$sections)) {
|
foreach ($_config_vars['sections'] as $this_section => $dummy) {
|
||||||
foreach ($_config_vars['sections'][$this_section]['vars'] as $variable => $value) {
|
if (in_array($this_section, (array)$sections)) {
|
||||||
if ($this->smarty->config_overwrite || !isset($scope_ptr->config_vars[$variable])) {
|
foreach ($_config_vars['sections'][$this_section]['vars'] as $variable => $value) {
|
||||||
$scope_ptr->config_vars[$variable] = $value;
|
if ($this->smarty->config_overwrite || !isset($scope_ptr->config_vars[$variable])) {
|
||||||
} else {
|
$scope_ptr->config_vars[$variable] = $value;
|
||||||
$scope_ptr->config_vars[$variable] = array_merge((array)$scope_ptr->config_vars[$variable], (array)$value);
|
} else {
|
||||||
}
|
$scope_ptr->config_vars[$variable] = array_merge((array)$scope_ptr->config_vars[$variable], (array)$value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user