diff options
author | Mario <mario@mariovavti.com> | 2018-03-09 11:12:18 +0100 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2018-03-09 11:12:18 +0100 |
commit | 4baf5eab16d809977a44e7911ddcab0ff8383897 (patch) | |
tree | 393f618c4cfc20f53264ecd8a26a08de0823d35d /library/Smarty/libs/sysplugins/smarty_internal_parsetree_dq.php | |
parent | 577da0eb9eb1f90a4cf7a70cfb3582cfb49007ac (diff) | |
parent | 7361af85b5488fc8bd1744389a3a332dc74276b0 (diff) | |
download | volse-hubzilla-3.2.tar.gz volse-hubzilla-3.2.tar.bz2 volse-hubzilla-3.2.zip |
Merge branch '3.2RC'3.2
Diffstat (limited to 'library/Smarty/libs/sysplugins/smarty_internal_parsetree_dq.php')
-rw-r--r-- | library/Smarty/libs/sysplugins/smarty_internal_parsetree_dq.php | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_parsetree_dq.php b/library/Smarty/libs/sysplugins/smarty_internal_parsetree_dq.php deleted file mode 100644 index 607389cb5..000000000 --- a/library/Smarty/libs/sysplugins/smarty_internal_parsetree_dq.php +++ /dev/null @@ -1,88 +0,0 @@ -<?php - -/** - * Double quoted string inside a tag. - * - * @package Smarty - * @subpackage Compiler - * @ignore - */ - -/** - * Double quoted string inside a tag. - * - * @package Smarty - * @subpackage Compiler - * @ignore - */ -class Smarty_Internal_ParseTree_Dq extends Smarty_Internal_ParseTree -{ - /** - * Create parse tree buffer for double quoted string subtrees - * - * @param object $parser parser object - * @param Smarty_Internal_ParseTree $subtree parse tree buffer - */ - public function __construct($parser, Smarty_Internal_ParseTree $subtree) - { - $this->subtrees[] = $subtree; - if ($subtree instanceof Smarty_Internal_ParseTree_Tag) { - $parser->block_nesting_level = count($parser->compiler->_tag_stack); - } - } - - /** - * Append buffer to subtree - * - * @param \Smarty_Internal_Templateparser $parser - * @param Smarty_Internal_ParseTree $subtree parse tree buffer - */ - public function append_subtree(Smarty_Internal_Templateparser $parser, Smarty_Internal_ParseTree $subtree) - { - $last_subtree = count($this->subtrees) - 1; - if ($last_subtree >= 0 && $this->subtrees[$last_subtree] instanceof Smarty_Internal_ParseTree_Tag && $this->subtrees[$last_subtree]->saved_block_nesting < $parser->block_nesting_level) { - if ($subtree instanceof Smarty_Internal_ParseTree_Code) { - $this->subtrees[$last_subtree]->data = $parser->compiler->appendCode($this->subtrees[$last_subtree]->data, '<?php echo ' . $subtree->data . ';?>'); - } elseif ($subtree instanceof Smarty_Internal_ParseTree_DqContent) { - $this->subtrees[$last_subtree]->data = $parser->compiler->appendCode($this->subtrees[$last_subtree]->data, '<?php echo "' . $subtree->data . '";?>'); - } else { - $this->subtrees[$last_subtree]->data = $parser->compiler->appendCode($this->subtrees[$last_subtree]->data, $subtree->data); - } - } else { - $this->subtrees[] = $subtree; - } - if ($subtree instanceof Smarty_Internal_ParseTree_Tag) { - $parser->block_nesting_level = count($parser->compiler->_tag_stack); - } - } - - /** - * Merge subtree buffer content together - * - * @param \Smarty_Internal_Templateparser $parser - * - * @return string compiled template code - */ - public function to_smarty_php(Smarty_Internal_Templateparser $parser) - { - $code = ''; - foreach ($this->subtrees as $subtree) { - if ($code !== "") { - $code .= "."; - } - if ($subtree instanceof Smarty_Internal_ParseTree_Tag) { - $more_php = $subtree->assign_to_var($parser); - } else { - $more_php = $subtree->to_smarty_php($parser); - } - - $code .= $more_php; - - if (!$subtree instanceof Smarty_Internal_ParseTree_DqContent) { - $parser->compiler->has_variable_string = true; - } - } - - return $code; - } -} |