28.07.2012

- bugfix array access of config variables did not work (Forum Topic 22527)
This commit is contained in:
uwe.tews@googlemail.com
2012-07-28 08:10:04 +00:00
parent 942db98f0c
commit 50b3a4f070
3 changed files with 988 additions and 976 deletions

View File

@@ -1,4 +1,7 @@
===== trunk ===== ===== trunk =====
28.07.2012
- bugfix array access of config variables did not work (Forum Topic 22527)
19.07.2012 19.07.2012
- bugfix the default plugin handler did create wrong compiled code for static class methods - bugfix the default plugin handler did create wrong compiled code for static class methods
from external script files (issue 108) from external script files (issue 108)

View File

@@ -80,7 +80,11 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
return '@' . trim($_index[1], "'"); return '@' . trim($_index[1], "'");
case 'config': case 'config':
return "\$_smarty_tpl->getConfigVariable($_index[1])"; if (isset($_index[2])) {
return "(is_array(\$tmp = \$_smarty_tpl->getConfigVariable($_index[1])) ? \$tmp[$_index[2]] : null)";
} else {
return "\$_smarty_tpl->getConfigVariable($_index[1])";
}
case 'ldelim': case 'ldelim':
$_ldelim = $compiler->smarty->left_delimiter; $_ldelim = $compiler->smarty->left_delimiter;
return "'$_ldelim'"; return "'$_ldelim'";

File diff suppressed because it is too large Load Diff