diff --git a/change_log.txt b/change_log.txt index 3863c856..33178537 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,6 @@ ===== SVN trunk ===== +28/12/2010 +- bugfix multiple {append} tags failed to compile. 22/12/2010 - update do not clone the Smarty object an internal createTemplate() calls to increase performance diff --git a/libs/sysplugins/smarty_internal_compile_append.php b/libs/sysplugins/smarty_internal_compile_append.php index 8b6c4ee8..98e696e3 100644 --- a/libs/sysplugins/smarty_internal_compile_append.php +++ b/libs/sysplugins/smarty_internal_compile_append.php @@ -13,10 +13,6 @@ * Smarty Internal Plugin Compile Append Class */ class Smarty_Internal_Compile_Append extends Smarty_Internal_Compile_Assign { - // attribute definitions - public $required_attributes = array('var', 'value'); - public $shorttag_order = array('var', 'value'); - public $optional_attributes = array('scope', 'index'); /** * Compiles code for the {append} tag @@ -29,6 +25,10 @@ class Smarty_Internal_Compile_Append extends Smarty_Internal_Compile_Assign { public function compile($args, $compiler, $parameter) { $this->compiler = $compiler; + // the following must be assigned at runtime because it will be overwritten in parent class + $this->required_attributes = array('var', 'value'); + $this->shorttag_order = array('var', 'value'); + $this->optional_attributes = array('scope','index'); // check and get attributes $_attr = $this->_get_attributes($args); // map to compile assign attributes diff --git a/libs/sysplugins/smarty_internal_compile_assign.php b/libs/sysplugins/smarty_internal_compile_assign.php index b7dab7c4..8d8c643a 100644 --- a/libs/sysplugins/smarty_internal_compile_assign.php +++ b/libs/sysplugins/smarty_internal_compile_assign.php @@ -25,6 +25,7 @@ class Smarty_Internal_Compile_Assign extends Smarty_Internal_CompileBase { public function compile($args, $compiler, $parameter) { $this->compiler = $compiler; + // the following must be assigned at runtime because it will be overwritten in Smarty_Internal_Compile_Append $this->required_attributes = array('var', 'value'); $this->shorttag_order = array('var', 'value'); $this->optional_attributes = array('scope');