- bugfix multiple {append} tags failed to compile.

This commit is contained in:
uwe.tews@googlemail.com
2010-12-28 22:40:13 +00:00
parent 9f3758ace1
commit 015f817259
3 changed files with 7 additions and 4 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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');