summaryrefslogtreecommitdiff
path: root/lib/smarty3/sysplugins/smarty_internal_parsetree_dq.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/smarty3/sysplugins/smarty_internal_parsetree_dq.php')
-rw-r--r--lib/smarty3/sysplugins/smarty_internal_parsetree_dq.php24
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;
}
}