From 0ab86dc7c9c7551836c33afb83ed2adaa7170853 Mon Sep 17 00:00:00 2001 From: andrey Date: Wed, 2 May 2001 19:21:10 +0000 Subject: [PATCH] Fix indexing by section properties. --- NEWS | 6 ++++-- Smarty_Compiler.class.php | 2 +- libs/Smarty_Compiler.class.php | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 9be9fd0e..5aa3ebcf 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ + - fixed indexing by section properties with the new syntax. (Andrei) + Version 1.4.0b2 --------------- - fixed issue in Config_File.class with referencing blank sections (Andrei) @@ -19,8 +21,8 @@ Version 1.4.0b1 - updated GLOBAL_ASSIGN to take SCRIPT_NAME from HTTP_SERVER_VARS instead of global variable. You can also assign several variables in one shot with an array. (Monte, Roman Neuhauser) - - added template prefilters, register_prefilter() and - unregister_prefilter() API functions. (Monte) + - added template prefilters, register_prefilter() and + unregister_prefilter() API functions. (Monte) - added RELEASE_NOTES file to distribution. (Monte) - moved CREDITS out of manual into its own file. (Monte) - added register_resource() and unregister_resource() API functions. (Monte) diff --git a/Smarty_Compiler.class.php b/Smarty_Compiler.class.php index d842df9a..9e415d30 100644 --- a/Smarty_Compiler.class.php +++ b/Smarty_Compiler.class.php @@ -724,7 +724,7 @@ class Smarty_Compiler extends Smarty { { list($var_ref, $modifiers) = explode('|', substr($var_expr, 1), 2); - preg_match_all('!\[\w+\]|(->|\.)\w+|^\w+!', $var_ref, $match); + preg_match_all('!\[\w+(\.\w+)?\]|(->|\.)\w+|^\w+!', $var_ref, $match); $indexes = $match[0]; $var_name = array_shift($indexes); diff --git a/libs/Smarty_Compiler.class.php b/libs/Smarty_Compiler.class.php index d842df9a..9e415d30 100644 --- a/libs/Smarty_Compiler.class.php +++ b/libs/Smarty_Compiler.class.php @@ -724,7 +724,7 @@ class Smarty_Compiler extends Smarty { { list($var_ref, $modifiers) = explode('|', substr($var_expr, 1), 2); - preg_match_all('!\[\w+\]|(->|\.)\w+|^\w+!', $var_ref, $match); + preg_match_all('!\[\w+(\.\w+)?\]|(->|\.)\w+|^\w+!', $var_ref, $match); $indexes = $match[0]; $var_name = array_shift($indexes);