mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
- bugfix code could be messed up when {tags} are used in multiple attributes https://github.com/smarty-php/smarty/issues/23
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
===== 3.1.22-dev ===== (xx.xx.2015)
|
||||
05.05.2015
|
||||
- bugfix code could be messed up when {tags} are used in multiple attributes https://github.com/smarty-php/smarty/issues/23
|
||||
|
||||
04.05.2015
|
||||
- bugfix Smarty_Resource::parseResourceName incompatible with Google AppEngine (https://github.com/smarty-php/smarty/issues/22)
|
||||
- improvement use is_file() checks to avoid errors suppressed by @ which could still cause problems (https://github.com/smarty-php/smarty/issues/24)
|
||||
|
@@ -111,7 +111,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
||||
/**
|
||||
* smarty version
|
||||
*/
|
||||
const SMARTY_VERSION = '3.1.22-dev/23';
|
||||
const SMARTY_VERSION = '3.1.22-dev/24';
|
||||
|
||||
/**
|
||||
* define variable scopes
|
||||
|
@@ -408,7 +408,11 @@ abstract class Smarty_Internal_TemplateCompilerBase
|
||||
/**
|
||||
* Compile Tag
|
||||
* This is a call back from the lexer/parser
|
||||
* It executes the required compile plugin for the Smarty tag
|
||||
*
|
||||
* Save current prefix code
|
||||
* Compile tag
|
||||
* Merge tag prefix code with saved one
|
||||
* (required nested tags in attributes)
|
||||
*
|
||||
* @param string $tag tag name
|
||||
* @param array $args array with tag attributes
|
||||
@@ -420,6 +424,27 @@ abstract class Smarty_Internal_TemplateCompilerBase
|
||||
*/
|
||||
public function compileTag($tag, $args, $parameter = array())
|
||||
{
|
||||
$this->prefixCodeStack[] = $this->prefix_code;
|
||||
$this->prefix_code = array();
|
||||
$result = $this->compileTag2($tag, $args, $parameter);
|
||||
$this->prefix_code = array_merge($this->prefix_code, array_pop($this->prefixCodeStack));
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compile Tag
|
||||
*
|
||||
* @param string $tag tag name
|
||||
* @param array $args array with tag attributes
|
||||
* @param array $parameter array with compilation parameter
|
||||
*
|
||||
* @throws SmartyCompilerException
|
||||
* @throws SmartyException
|
||||
* @return string compiled code
|
||||
*/
|
||||
private function compileTag2($tag, $args, $parameter)
|
||||
{
|
||||
$plugin_type = '';
|
||||
// $args contains the attributes parsed and compiled by the lexer/parser
|
||||
// assume that tag does compile into code, but creates no HTML output
|
||||
$this->has_code = true;
|
||||
|
Reference in New Issue
Block a user