cvs: smarty / NEWS /libs Smarty_Compiler.class.php
"Messju Mohr" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsmessju1068742308@cvsserver> |
messju Thu Nov 13 11:51:48 2003 EDT
Modified files:
/smarty NEWS
/smarty/libs Smarty_Compiler.class.php
Log:
fix handling of $var.key inside []
Index: smarty/NEWS
diff -u smarty/NEWS:1.401 smarty/NEWS:1.402
--- smarty/NEWS:1.401 Tue Nov 11 17:46:12 2003
+++ smarty/NEWS Thu Nov 13 11:51:47 2003
@@ -1,3 +1,4 @@
+ - fix handling of $var.key inside [] (messju)
- fix handling of assign inside {insert}-tags (messju)
- fix handling if [...] inside triple-quotes in config-files (messju)
- fix handling of simple-math-operators inside modifiers (Dominik, messju)
Index: smarty/libs/Smarty_Compiler.class.php
diff -u smarty/libs/Smarty_Compiler.class.php:1.293 smarty/libs/Smarty_Compiler.class.php:1.294
--- smarty/libs/Smarty_Compiler.class.php:1.293 Mon Oct 27 10:27:55 2003
+++ smarty/libs/Smarty_Compiler.class.php Thu Nov 13 11:51:47 2003
@@ -39,7 +39,7 @@
* @package Smarty
*/
-/* $Id: Smarty_Compiler.class.php,v 1.293 2003/10/27 15:27:55 messju Exp $ */
+/* $Id: Smarty_Compiler.class.php,v 1.294 2003/11/13 16:51:47 messju Exp $ */
/**
* Template compiling class
@@ -1674,7 +1674,11 @@
if (is_numeric($_index)) {
$_output .= "[$_index]";
} elseif ($_index{0} == '$') {
- $_output .= "[\$this->_tpl_vars['" . substr($_index, 1) . "']]";
+ if (strpos($_index, '.') !== false) {
+ $_output .= '[' . $this->_parse_var($_index) . ']';
+ } else {
+ $_output .= "[\$this->_tpl_vars['" . substr($_index, 1) . "']]";
+ }
} else {
$_var_parts = explode('.', $_index);
$_var_section = $_var_parts[0];
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php