mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 03:14:27 +02:00
- improvement of Smarty_Internal_Config::loadConfigVars() dropped the in_array for index look up
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
===== trunk =====
|
===== trunk =====
|
||||||
|
29.09.2011
|
||||||
|
- improvement of Smarty_Internal_Config::loadConfigVars() dropped the in_array for index look up
|
||||||
|
|
||||||
28.09.2011
|
28.09.2011
|
||||||
- bugfix on template functions called nocache calling other template functions
|
- bugfix on template functions called nocache calling other template functions
|
||||||
|
|
||||||
|
@@ -240,8 +240,9 @@ class Smarty_Internal_Config {
|
|||||||
}
|
}
|
||||||
// scan sections
|
// scan sections
|
||||||
if (!empty($sections)) {
|
if (!empty($sections)) {
|
||||||
|
$sections = array_flip((array) $sections);
|
||||||
foreach ($_config_vars['sections'] as $this_section => $dummy) {
|
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) {
|
foreach ($_config_vars['sections'][$this_section]['vars'] as $variable => $value) {
|
||||||
if ($this->smarty->config_overwrite || !isset($scope_ptr->config_vars[$variable])) {
|
if ($this->smarty->config_overwrite || !isset($scope_ptr->config_vars[$variable])) {
|
||||||
$scope_ptr->config_vars[$variable] = $value;
|
$scope_ptr->config_vars[$variable] = $value;
|
||||||
|
Reference in New Issue
Block a user