Update to Smarty 3.1.15
This commit is contained in:
parent
bea18b03e2
commit
1c9cd9208f
119 changed files with 5232 additions and 4641 deletions
|
|
@ -15,8 +15,8 @@
|
|||
* @subpackage Compiler
|
||||
* @ignore
|
||||
*/
|
||||
abstract class _smarty_parsetree {
|
||||
|
||||
abstract class _smarty_parsetree
|
||||
{
|
||||
/**
|
||||
* Parser object
|
||||
* @var object
|
||||
|
|
@ -31,7 +31,7 @@ abstract class _smarty_parsetree {
|
|||
/**
|
||||
* Return buffer
|
||||
*
|
||||
* @return string buffer content
|
||||
* @return string buffer content
|
||||
*/
|
||||
abstract public function to_smarty_php();
|
||||
|
||||
|
|
@ -44,8 +44,8 @@ abstract class _smarty_parsetree {
|
|||
* @subpackage Compiler
|
||||
* @ignore
|
||||
*/
|
||||
class _smarty_tag extends _smarty_parsetree {
|
||||
|
||||
class _smarty_tag extends _smarty_parsetree
|
||||
{
|
||||
/**
|
||||
* Saved block nesting level
|
||||
* @var int
|
||||
|
|
@ -55,8 +55,8 @@ class _smarty_tag extends _smarty_parsetree {
|
|||
/**
|
||||
* Create parse tree buffer for Smarty tag
|
||||
*
|
||||
* @param object $parser parser object
|
||||
* @param string $data content
|
||||
* @param object $parser parser object
|
||||
* @param string $data content
|
||||
*/
|
||||
public function __construct($parser, $data)
|
||||
{
|
||||
|
|
@ -68,7 +68,7 @@ class _smarty_tag extends _smarty_parsetree {
|
|||
/**
|
||||
* Return buffer content
|
||||
*
|
||||
* @return string content
|
||||
* @return string content
|
||||
*/
|
||||
public function to_smarty_php()
|
||||
{
|
||||
|
|
@ -82,8 +82,9 @@ class _smarty_tag extends _smarty_parsetree {
|
|||
*/
|
||||
public function assign_to_var()
|
||||
{
|
||||
$var = sprintf('$_tmp%d', ++$this->parser->prefix_number);
|
||||
$var = sprintf('$_tmp%d', ++Smarty_Internal_Templateparser::$prefix_number);
|
||||
$this->parser->compiler->prefix_code[] = sprintf('<?php ob_start();?>%s<?php %s=ob_get_clean();?>', $this->data, $var);
|
||||
|
||||
return $var;
|
||||
}
|
||||
|
||||
|
|
@ -96,14 +97,13 @@ class _smarty_tag extends _smarty_parsetree {
|
|||
* @subpackage Compiler
|
||||
* @ignore
|
||||
*/
|
||||
class _smarty_code extends _smarty_parsetree {
|
||||
|
||||
|
||||
class _smarty_code extends _smarty_parsetree
|
||||
{
|
||||
/**
|
||||
* Create parse tree buffer for code fragment
|
||||
*
|
||||
* @param object $parser parser object
|
||||
* @param string $data content
|
||||
* @param object $parser parser object
|
||||
* @param string $data content
|
||||
*/
|
||||
public function __construct($parser, $data)
|
||||
{
|
||||
|
|
@ -114,7 +114,7 @@ class _smarty_code extends _smarty_parsetree {
|
|||
/**
|
||||
* Return buffer content in parentheses
|
||||
*
|
||||
* @return string content
|
||||
* @return string content
|
||||
*/
|
||||
public function to_smarty_php()
|
||||
{
|
||||
|
|
@ -130,13 +130,13 @@ class _smarty_code extends _smarty_parsetree {
|
|||
* @subpackage Compiler
|
||||
* @ignore
|
||||
*/
|
||||
class _smarty_doublequoted extends _smarty_parsetree {
|
||||
|
||||
class _smarty_doublequoted extends _smarty_parsetree
|
||||
{
|
||||
/**
|
||||
* Create parse tree buffer for double quoted string subtrees
|
||||
*
|
||||
* @param object $parser parser object
|
||||
* @param _smarty_parsetree $subtree parsetree buffer
|
||||
* @param object $parser parser object
|
||||
* @param _smarty_parsetree $subtree parsetree buffer
|
||||
*/
|
||||
public function __construct($parser, _smarty_parsetree $subtree)
|
||||
{
|
||||
|
|
@ -150,7 +150,7 @@ class _smarty_doublequoted extends _smarty_parsetree {
|
|||
/**
|
||||
* Append buffer to subtree
|
||||
*
|
||||
* @param _smarty_parsetree $subtree parsetree buffer
|
||||
* @param _smarty_parsetree $subtree parsetree buffer
|
||||
*/
|
||||
public function append_subtree(_smarty_parsetree $subtree)
|
||||
{
|
||||
|
|
@ -174,7 +174,7 @@ class _smarty_doublequoted extends _smarty_parsetree {
|
|||
/**
|
||||
* Merge subtree buffer content together
|
||||
*
|
||||
* @return string compiled template code
|
||||
* @return string compiled template code
|
||||
*/
|
||||
public function to_smarty_php()
|
||||
{
|
||||
|
|
@ -195,6 +195,7 @@ class _smarty_doublequoted extends _smarty_parsetree {
|
|||
$this->parser->compiler->has_variable_string = true;
|
||||
}
|
||||
}
|
||||
|
||||
return $code;
|
||||
}
|
||||
|
||||
|
|
@ -207,14 +208,13 @@ class _smarty_doublequoted extends _smarty_parsetree {
|
|||
* @subpackage Compiler
|
||||
* @ignore
|
||||
*/
|
||||
class _smarty_dq_content extends _smarty_parsetree {
|
||||
|
||||
|
||||
class _smarty_dq_content extends _smarty_parsetree
|
||||
{
|
||||
/**
|
||||
* Create parse tree buffer with string content
|
||||
*
|
||||
* @param object $parser parser object
|
||||
* @param string $data string section
|
||||
* @param object $parser parser object
|
||||
* @param string $data string section
|
||||
*/
|
||||
public function __construct($parser, $data)
|
||||
{
|
||||
|
|
@ -241,8 +241,8 @@ class _smarty_dq_content extends _smarty_parsetree {
|
|||
* @subpackage Compiler
|
||||
* @ignore
|
||||
*/
|
||||
class _smarty_template_buffer extends _smarty_parsetree {
|
||||
|
||||
class _smarty_template_buffer extends _smarty_parsetree
|
||||
{
|
||||
/**
|
||||
* Array of template elements
|
||||
*
|
||||
|
|
@ -253,7 +253,7 @@ class _smarty_template_buffer extends _smarty_parsetree {
|
|||
/**
|
||||
* Create root of parse tree for template elements
|
||||
*
|
||||
* @param object $parser parse object
|
||||
* @param object $parser parse object
|
||||
*/
|
||||
public function __construct($parser)
|
||||
{
|
||||
|
|
@ -320,6 +320,7 @@ class _smarty_template_buffer extends _smarty_parsetree {
|
|||
}
|
||||
$code .= $this->subtrees[$key]->to_smarty_php();
|
||||
}
|
||||
|
||||
return $code;
|
||||
}
|
||||
|
||||
|
|
@ -332,14 +333,13 @@ class _smarty_template_buffer extends _smarty_parsetree {
|
|||
* @subpackage Compiler
|
||||
* @ignore
|
||||
*/
|
||||
class _smarty_text extends _smarty_parsetree {
|
||||
|
||||
|
||||
class _smarty_text extends _smarty_parsetree
|
||||
{
|
||||
/**
|
||||
* Create template text buffer
|
||||
*
|
||||
* @param object $parser parser object
|
||||
* @param string $data text
|
||||
* @param object $parser parser object
|
||||
* @param string $data text
|
||||
*/
|
||||
public function __construct($parser, $data)
|
||||
{
|
||||
|
|
@ -366,13 +366,13 @@ class _smarty_text extends _smarty_parsetree {
|
|||
* @subpackage Compiler
|
||||
* @ignore
|
||||
*/
|
||||
class _smarty_linebreak extends _smarty_parsetree {
|
||||
|
||||
class _smarty_linebreak extends _smarty_parsetree
|
||||
{
|
||||
/**
|
||||
* Create buffer with linebreak content
|
||||
*
|
||||
* @param object $parser parser object
|
||||
* @param string $data linebreak string
|
||||
* @param object $parser parser object
|
||||
* @param string $data linebreak string
|
||||
*/
|
||||
public function __construct($parser, $data)
|
||||
{
|
||||
|
|
@ -391,5 +391,3 @@ class _smarty_linebreak extends _smarty_parsetree {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in a new issue