diff options
author | emkael <emkael@tlen.pl> | 2018-10-18 02:40:38 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2018-10-18 02:40:38 +0200 |
commit | eab8a101e7a3fcbb41e01a574985e06c5a3775de (patch) | |
tree | 60f201da5984b0c3638d10da02bba42b61aa3177 /lib/smarty3/sysplugins/smarty_internal_parsetree_dq.php | |
parent | 7f38be342c1495aeca418286c15c25c18ac9e142 (diff) |
Updating Smarty
Diffstat (limited to 'lib/smarty3/sysplugins/smarty_internal_parsetree_dq.php')
-rw-r--r-- | lib/smarty3/sysplugins/smarty_internal_parsetree_dq.php | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/smarty3/sysplugins/smarty_internal_parsetree_dq.php b/lib/smarty3/sysplugins/smarty_internal_parsetree_dq.php index 8c2e0d9..8655f58 100644 --- a/lib/smarty3/sysplugins/smarty_internal_parsetree_dq.php +++ b/lib/smarty3/sysplugins/smarty_internal_parsetree_dq.php @@ -1,5 +1,4 @@ <?php - /** * Double quoted string inside a tag. * @@ -40,17 +39,21 @@ class Smarty_Internal_ParseTree_Dq extends Smarty_Internal_ParseTree 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 ($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 . ';?>'); + $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 . '";?>'); + $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); @@ -74,22 +77,19 @@ class Smarty_Internal_ParseTree_Dq extends Smarty_Internal_ParseTree { $code = ''; foreach ($this->subtrees as $subtree) { - if ($code !== "") { - $code .= "."; + 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; } } |