- improvement of Smarty_Internal_Config::loadConfigVars() dropped the in_array for index look up

This commit is contained in:
rodneyrehm
2011-09-29 12:59:06 +00:00
parent bc2d519c38
commit 41958a5790
2 changed files with 5 additions and 1 deletions

View File

@@ -1,4 +1,7 @@
===== trunk =====
29.09.2011
- improvement of Smarty_Internal_Config::loadConfigVars() dropped the in_array for index look up
28.09.2011
- bugfix on template functions called nocache calling other template functions

View File

@@ -240,8 +240,9 @@ class Smarty_Internal_Config {
}
// scan sections
if (!empty($sections)) {
$sections = array_flip((array) $sections);
foreach ($_config_vars['sections'] as $this_section => $dummy) {
if (in_array($this_section, (array) $sections)) {
if (isset($sections[$this_section])) {
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;