[smarty-php] r4895 committed - - bugfix any tag placed within "<script language=php>" will throw a s...

13 views
Skip to first unread message

smart...@googlecode.com

unread,
Oct 14, 2014, 5:45:28 PM10/14/14
to smart...@googlegroups.com
Revision: 4895
Author: Uwe....@googlemail.com
Date: Tue Oct 14 21:45:05 2014 UTC
Log: - bugfix any tag placed within "<script language=php>" will
throw a security exception to close all thinkable holes

https://code.google.com/p/smarty-php/source/detail?r=4895

Modified:
/trunk/development/lexer/smarty_internal_templatelexer.php
/trunk/development/lexer/smarty_internal_templatelexer.plex
/trunk/development/lexer/smarty_internal_templateparser.php
/trunk/development/lexer/smarty_internal_templateparser.y
/trunk/distribution/change_log.txt
/trunk/distribution/libs/sysplugins/smarty_internal_templatebase.php
/trunk/distribution/libs/sysplugins/smarty_internal_templatelexer.php
/trunk/distribution/libs/sysplugins/smarty_internal_templateparser.php

=======================================
--- /trunk/development/lexer/smarty_internal_templatelexer.php Sun Oct 12
15:09:52 2014 UTC
+++ /trunk/development/lexer/smarty_internal_templatelexer.php Tue Oct 14
21:45:05 2014 UTC
@@ -21,7 +21,6 @@
public $line;
public $taglineno;
public $is_phpScript = false;
- public $phpValue = '';
public $state = 1;
public $smarty;
private $heredoc_id_stack = Array();
@@ -164,14 +163,13 @@
19 => 0,
20 => 0,
21 => 0,
- 22 => 0,
- 23 => 4,
- 28 => 0,
+ 22 => 4,
+ 27 => 0,
);
if ($this->counter >= strlen($this->data)) {
return false; // end of input
}
- $yy_global_pattern = "/\G(\\{\\})|\G(" .
$this->ldel . "\\*([\S\s]*?)\\*" . $this->rdel . ")|\G(" .
$this->ldel . "\\s*strip\\s*" . $this->rdel . ")|\G(" .
$this->ldel . "\\s*\/strip\\s*" . $this->rdel . ")|\G(" .
$this->ldel . "\\s*literal\\s*" . $this->rdel . ")|\G(" .
$this->ldel . "\\s*(if|elseif|else if|while)\\s+)|\G(" .
$this->ldel . "\\s*for\\s+)|\G(" . $this->ldel . "\\s*foreach(?![^\s]))|
\G(" . $this->ldel . "\\s*setfilter\\s+)|\G(" . $this->ldel . "\\s*\/)|
\G(" . $this->ldel . "\\s*)|
\G((<script\\s+language\\s*=\\s*[\"']?\\s*php\\s*[\"']?\\s*>)|
(<\\?(?:php\\w+|=|[a-zA-Z]+)?))|\G(\\?>)|\G(<\/script>)|\G(<\/script>)|
\G(\\s*" . $this->rdel . ")|\G(<%)|\G(%>)|\G(<(([^>]*?)(?=" .
$this->ldel . ")" . $this->ldel . "\\*([\S\s]*?)\\*" .
$this->rdel . ")+([^>]*?)(?!" . $this->ldel . ")>)|\G([\S\s])/iS";
+ $yy_global_pattern = "/\G(\\{\\})|\G(" .
$this->ldel . "\\*([\S\s]*?)\\*" . $this->rdel . ")|\G(" .
$this->ldel . "\\s*strip\\s*" . $this->rdel . ")|\G(" .
$this->ldel . "\\s*\/strip\\s*" . $this->rdel . ")|\G(" .
$this->ldel . "\\s*literal\\s*" . $this->rdel . ")|\G(" .
$this->ldel . "\\s*(if|elseif|else if|while)\\s+)|\G(" .
$this->ldel . "\\s*for\\s+)|\G(" . $this->ldel . "\\s*foreach(?![^\s]))|
\G(" . $this->ldel . "\\s*setfilter\\s+)|\G(" . $this->ldel . "\\s*\/)|
\G(" . $this->ldel . "\\s*)|
\G((<script\\s+language\\s*=\\s*[\"']?\\s*php\\s*[\"']?\\s*>)|
(<\\?(?:php\\w+|=|[a-zA-Z]+)?))|\G(\\?>)|\G(<\/script>)|\G(\\s*" .
$this->rdel . ")|\G(<%)|\G(%>)|\G(<(([^>]*?)(?=" . $this->ldel . ")" .
$this->ldel . "([\S\s]*?)" . $this->rdel . ")+([^>]*?)(?!" .
$this->ldel . ")>)|\G([\S\s])/iS";

do {
if (preg_match($yy_global_pattern, $this->data, $yymatches,
null, $this->counter)) {
@@ -339,11 +337,10 @@
function yy_r1_14($yy_subpatterns)
{

- if ($script = strpos($this->value, '<s') === 0 ||
in_array($this->value, Array('<?', '<?=', '<?php'))) {
+ if (($script = strpos($this->value, '<s') === 0) ||
in_array($this->value, Array('<?', '<?=', '<?php'))) {
if ($script) {
$this->is_phpScript = true;
}
- $this->phpValue = $this->value;
$this->token = Smarty_Internal_Templateparser::TP_PHPSTARTTAG;
} elseif ($this->value == '<?xml') {
$this->token = Smarty_Internal_Templateparser::TP_XMLTAG;
@@ -368,35 +365,27 @@
function yy_r1_19($yy_subpatterns)
{

- $this->token = Smarty_Internal_Templateparser::TP_PHPENDSCRIPT;
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
}

function yy_r1_20($yy_subpatterns)
{

- $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ $this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG;
}

function yy_r1_21($yy_subpatterns)
{

- $this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG;
+ $this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG;
}

function yy_r1_22($yy_subpatterns)
{

- $this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG;
- }
-
- function yy_r1_23($yy_subpatterns)
- {
-
- $clean =
preg_replace("/{$this->ldel}\*([\S\s]*?)\*{$this->rdel}/", '',
$this->value);
+ $clean =
preg_replace("/{$this->ldel}([\S\s]*?){$this->rdel}/", '', $this->value);
if
(preg_match("/<script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*>/",
$clean, $match)) {
- $this->phpValue = $match[0];
- $this->is_phpScript = true;
- $this->token = Smarty_Internal_Templateparser::TP_PHPSTARTTAG;
+ $this->compiler->trigger_template_error('Security error:
Illegal code injection');
} else {
preg_match("/([\S\s]*?)(?={$this->ldel})/", $this->value,
$match);
$this->value = $match[0];
@@ -404,12 +393,12 @@
}
}

- function yy_r1_28($yy_subpatterns)
+ function yy_r1_27($yy_subpatterns)
{

$phpEndScript = $this->is_phpScript ? '|<\\/script>' : '';
$to = strlen($this->data);
- preg_match("/<\?|<%|\?>|%>|
<script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*>|
<(([^>]*?)(?={$this->ldel}){$this->ldel}\*([\S\s]*?)\*{$this->rdel})+([^>]*?)(?!{$this->ldel})>|
{$this->ldel}{$phpEndScript}/", $this->data, $match, PREG_OFFSET_CAPTURE,
$this->counter);
+ preg_match("/<\?|<%|\?>|%>|
<script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*>|
<(([^>]*?)(?={$this->ldel}){$this->ldel}([\S\s]*?){$this->rdel})+([^>]*?)(?!{$this->ldel})>|
{$this->ldel}{$phpEndScript}/", $this->data, $match, PREG_OFFSET_CAPTURE,
$this->counter);
if (isset($match[0][1])) {
$to = $match[0][1];
}
@@ -993,7 +982,7 @@
if ($this->counter >= strlen($this->data)) {
return false; // end of input
}
- $yy_global_pattern = "/\G(" . $this->ldel . "\\s*literal\\s*" .
$this->rdel . ")|\G(" . $this->ldel . "\\s*\/literal\\s*" .
$this->rdel . ")|
\G((<script\\s+language\\s*=\\s*[\"']?\\s*php\\s*[\"']?\\s*>)|
(<\\?(?:php\\w+|=|[a-zA-Z]+)?))|\G(\\?>)|\G(<\/script>)|\G(<%)|\G(%>)|
\G(<(([^>]*?)(?=" . $this->ldel . ")" . $this->ldel . "\\*([\S\s]*?)\\*" .
$this->rdel . ")+([^>]*?)(?!" . $this->ldel . ")>)|\G([\S\s])/iS";
+ $yy_global_pattern = "/\G(" . $this->ldel . "\\s*literal\\s*" .
$this->rdel . ")|\G(" . $this->ldel . "\\s*\/literal\\s*" .
$this->rdel . ")|
\G((<script\\s+language\\s*=\\s*[\"']?\\s*php\\s*[\"']?\\s*>)|
(<\\?(?:php\\w+|=|[a-zA-Z]+)?))|\G(\\?>)|\G(<\/script>)|\G(<%)|\G(%>)|
\G(<(([^>]*?)(?=" . $this->ldel . ")" . $this->ldel . "([\S\s]*?)" .
$this->rdel . ")+([^>]*?)(?!" . $this->ldel . ")>)|\G([\S\s])/iS";

do {
if (preg_match($yy_global_pattern, $this->data, $yymatches,
null, $this->counter)) {
@@ -1068,7 +1057,7 @@
function yy_r3_3($yy_subpatterns)
{

- if ($script = strpos($this->value, '<s') === 0 ||
in_array($this->value, Array('<?', '<?=', '<?php'))) {
+ if (($script = strpos($this->value, '<s') === 0) ||
in_array($this->value, Array('<?', '<?=', '<?php'))) {
if ($script) {
$this->is_phpScript = true;
}
@@ -1106,11 +1095,9 @@
function yy_r3_10($yy_subpatterns)
{

- $clean =
preg_replace("/{$this->ldel}\*([\S\s]*?)\*{$this->rdel}/", '',
$this->value);
+ $clean =
preg_replace("/{$this->ldel}([\S\s]*?){$this->rdel}/", '', $this->value);
if
(preg_match("/<script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*>/",
$clean, $match)) {
- $this->phpValue = $match[0];
- $this->is_phpScript = true;
- $this->token = Smarty_Internal_Templateparser::TP_PHPSTARTTAG;
+ $this->compiler->trigger_template_error('Security error:
Illegal code injection');
} else {
preg_match("/([\S\s]*?)(?={$this->ldel})/", $this->value,
$match);
$this->value = $match[0];
@@ -1123,7 +1110,7 @@

$phpEndScript = $this->is_phpScript ? '|<\\/script>' : '';
$to = strlen($this->data);
- preg_match("/<\?|<%|\?>|%>|
<script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*>|
<(([^>]*?)(?={$this->ldel}){$this->ldel}\*([\S\s]*?)\*{$this->rdel})+([^>]*?)(?!{$this->ldel})>|
{$this->ldel}\/?literal{$this->rdel}{$phpEndScript}/", $this->data, $match,
PREG_OFFSET_CAPTURE, $this->counter);
+ preg_match("/<\?|<%|\?>|%>|
<script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*>|
{$this->ldel}\/?literal{$this->rdel}{$phpEndScript}/", $this->data, $match,
PREG_OFFSET_CAPTURE, $this->counter);
if (isset($match[0][1])) {
$to = $match[0][1];
} else {
=======================================
--- /trunk/development/lexer/smarty_internal_templatelexer.plex Sun Oct 12
15:09:52 2014 UTC
+++ /trunk/development/lexer/smarty_internal_templatelexer.plex Tue Oct 14
21:45:05 2014 UTC
@@ -20,7 +20,6 @@
public $line;
public $taglineno;
public $is_phpScript = false;
- public $phpValue = '';
public $state = 1;
public $smarty;
private $heredoc_id_stack = Array();
@@ -120,7 +119,7 @@
phpstarttag = /(<script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*>)|
(<\?(?:php\w+|=|[a-zA-Z]+)?)/
phpendtag = /\?>/
phpendscript = /<\/script>/
- scriptcomment =
/<(([^>]*?)(?=SMARTYldel)SMARTYldel\*([\S\s]*?)\*SMARTYrdel)+([^>]*?)(?!SMARTYldel)>/
+ scriptinjection =
/<(([^>]*?)(?=SMARTYldel)SMARTYldel([\S\s]*?)SMARTYrdel)+([^>]*?)(?!SMARTYldel)>/
aspstarttag = /<%/
aspendtag = /%>/
slash = /\//
@@ -282,11 +281,10 @@
}
}
phpstarttag {
- if ($script = strpos($this->value, '<s') === 0 ||
in_array($this->value, Array('<?', '<?=', '<?php'))) {
+ if (($script = strpos($this->value, '<s') === 0) ||
in_array($this->value, Array('<?', '<?=', '<?php'))) {
if ($script) {
$this->is_phpScript = true;
}
- $this->phpValue = $this->value;
$this->token = Smarty_Internal_Templateparser::TP_PHPSTARTTAG;
} elseif ($this->value == '<?xml') {
$this->token = Smarty_Internal_Templateparser::TP_XMLTAG;
@@ -298,9 +296,6 @@
phpendtag {
$this->token = Smarty_Internal_Templateparser::TP_PHPENDTAG;
}
- phpendscript {
- $this->token = Smarty_Internal_Templateparser::TP_PHPENDSCRIPT;
- }
phpendscript {
$this->token = Smarty_Internal_Templateparser::TP_PHPENDSCRIPT;
}
@@ -313,12 +308,10 @@
aspendtag {
$this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG;
}
- scriptcomment {
- $clean =
preg_replace("/{$this->ldel}\*([\S\s]*?)\*{$this->rdel}/",'',$this->value);
+ scriptinjection {
+ $clean =
preg_replace("/{$this->ldel}([\S\s]*?){$this->rdel}/",'',$this->value);
if
(preg_match("/<script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*>/",$clean,$match))
{
- $this->phpValue = $match[0];
- $this->is_phpScript = true;
- $this->token = Smarty_Internal_Templateparser::TP_PHPSTARTTAG;
+ $this->compiler->trigger_template_error ('Security error: Illegal
code injection');
} else {
preg_match("/([\S\s]*?)(?={$this->ldel})/",$this->value,$match);
$this->value = $match[0];
@@ -328,7 +321,7 @@
text {
$phpEndScript = $this->is_phpScript ? '|<\\/script>' : '';
$to = strlen($this->data);
- preg_match("/<\?|<%|\?>|%>|
<script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*>|
<(([^>]*?)(?={$this->ldel}){$this->ldel}\*([\S\s]*?)\*{$this->rdel})+([^>]*?)(?!{$this->ldel})>|
{$this->ldel}{$phpEndScript}/",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter);
+ preg_match("/<\?|<%|\?>|%>|
<script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*>|
<(([^>]*?)(?={$this->ldel}){$this->ldel}([\S\s]*?){$this->rdel})+([^>]*?)(?!{$this->ldel})>|
{$this->ldel}{$phpEndScript}/",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter);
if (isset($match[0][1])) {
$to = $match[0][1];
}
@@ -602,7 +595,7 @@
}
}
phpstarttag {
- if ($script = strpos($this->value, '<s') === 0 ||
in_array($this->value, Array('<?', '<?=', '<?php'))) {
+ if (($script = strpos($this->value, '<s') === 0) ||
in_array($this->value, Array('<?', '<?=', '<?php'))) {
if ($script) {
$this->is_phpScript = true;
}
@@ -624,12 +617,10 @@
aspendtag {
$this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG;
}
- scriptcomment {
- $clean =
preg_replace("/{$this->ldel}\*([\S\s]*?)\*{$this->rdel}/",'',$this->value);
+ scriptinjection {
+ $clean =
preg_replace("/{$this->ldel}([\S\s]*?){$this->rdel}/",'',$this->value);
if
(preg_match("/<script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*>/",$clean,$match))
{
- $this->phpValue = $match[0];
- $this->is_phpScript = true;
- $this->token = Smarty_Internal_Templateparser::TP_PHPSTARTTAG;
+ $this->compiler->trigger_template_error ('Security error: Illegal
code injection');
} else {
preg_match("/([\S\s]*?)(?={$this->ldel})/",$this->value,$match);
$this->value = $match[0];
@@ -639,7 +630,7 @@
text {
$phpEndScript = $this->is_phpScript ? '|<\\/script>' : '';
$to = strlen($this->data);
- preg_match("/<\?|<%|\?>|%>|
<script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*>|
<(([^>]*?)(?={$this->ldel}){$this->ldel}\*([\S\s]*?)\*{$this->rdel})+([^>]*?)(?!{$this->ldel})>|
{$this->ldel}\/?literal{$this->rdel}{$phpEndScript}/",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter);
+ preg_match("/<\?|<%|\?>|%>|
<script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*>|
{$this->ldel}\/?literal{$this->rdel}{$phpEndScript}/",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter);
if (isset($match[0][1])) {
$to = $match[0][1];
} else {
=======================================
--- /trunk/development/lexer/smarty_internal_templateparser.php Sun Oct 12
15:57:16 2014 UTC
+++ /trunk/development/lexer/smarty_internal_templateparser.php Tue Oct 14
21:45:05 2014 UTC
@@ -3062,7 +3062,7 @@
public static $yyReduceMap = array(
0 => 0,
1 => 1,
- 2 => 1,
+ 2 => 2,
4 => 4,
5 => 5,
6 => 6,
@@ -3281,7 +3281,16 @@
}
}
#line 2147 "smarty_internal_templateparser.php"
- #line 130 "smarty_internal_templateparser.y"
+ #line 117 "smarty_internal_templateparser.y"
+ function yy_r2()
+ {
+ if ($this->yystack[$this->yyidx + 0]->minor != null) {
+ // because of possible code injection
+
$this->current_buffer->append_subtree($this->yystack[$this->yyidx +
0]->minor);
+ }
+ }
+ #line 2155 "smarty_internal_templateparser.php"
+ #line 131 "smarty_internal_templateparser.y"
function yy_r4()
{
if ($this->compiler->has_code) {
@@ -3297,37 +3306,37 @@
$this->compiler->has_variable_string = false;
$this->block_nesting_level = count($this->compiler->_tag_stack);
}
- #line 2159 "smarty_internal_templateparser.php"
- #line 142 "smarty_internal_templateparser.y"
+ #line 2167 "smarty_internal_templateparser.php"
+ #line 143 "smarty_internal_templateparser.y"
function yy_r5()
{
$this->_retvalue = null;
}
- #line 2164 "smarty_internal_templateparser.php"
- #line 147 "smarty_internal_templateparser.y"
+ #line 2172 "smarty_internal_templateparser.php"
+ #line 148 "smarty_internal_templateparser.y"
function yy_r6()
{
$this->_retvalue = new _smarty_text($this,
$this->yystack[$this->yyidx + 0]->minor);
}
- #line 2169 "smarty_internal_templateparser.php"
- #line 152 "smarty_internal_templateparser.y"
+ #line 2177 "smarty_internal_templateparser.php"
+ #line 153 "smarty_internal_templateparser.y"
function yy_r7()
{
- if (strpos($this->lex->phpValue, '<s') === 0) {
+ if (strpos($this->yystack[$this->yyidx + 0]->minor, '<s') === 0) {
$this->lex->is_phpScript = true;
}
if ($this->php_handling == Smarty::PHP_PASSTHRU) {
if ($this->lex->is_phpScript) {
- $s = addcslashes($this->lex->phpValue, "'");
+ $s = addcslashes($this->yystack[$this->yyidx +
0]->minor, "'");
$this->compiler->tag_nocache = true;
$save = $this->template->has_nocache_code;
$this->_retvalue = new _smarty_text($this,
$this->compiler->processNocacheCode("<?php echo '{$s}';?>\n", true));
$this->template->has_nocache_code = $save;
} else {
- $this->_retvalue = new _smarty_text($this,
self::escape_start_tag($this->lex->phpValue));
+ $this->_retvalue = new _smarty_text($this,
self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor));
}
} elseif ($this->php_handling == Smarty::PHP_QUOTE) {
- $this->_retvalue = new _smarty_text($this,
htmlspecialchars($this->lex->phpValue, ENT_QUOTES));
+ $this->_retvalue = new _smarty_text($this,
htmlspecialchars($this->yystack[$this->yyidx + 0]->minor, ENT_QUOTES));
} elseif ($this->php_handling == Smarty::PHP_ALLOW) {
if (!($this->smarty instanceof SmartyBC)) {
$this->compiler->trigger_template_error(self::Err3);
@@ -3337,8 +3346,8 @@
$this->_retvalue = null;
}
}
- #line 2196 "smarty_internal_templateparser.php"
- #line 179 "smarty_internal_templateparser.y"
+ #line 2204 "smarty_internal_templateparser.php"
+ #line 180 "smarty_internal_templateparser.y"
function yy_r8()
{
if ($this->is_xml) {
@@ -3357,8 +3366,8 @@
$this->_retvalue = null;
}
}
- #line 2215 "smarty_internal_templateparser.php"
- #line 197 "smarty_internal_templateparser.y"
+ #line 2223 "smarty_internal_templateparser.php"
+ #line 198 "smarty_internal_templateparser.y"
function yy_r9()
{
if (!$this->lex->is_phpScript) {
@@ -3376,8 +3385,8 @@
}
}
}
- #line 2233 "smarty_internal_templateparser.php"
- #line 215 "smarty_internal_templateparser.y"
+ #line 2241 "smarty_internal_templateparser.php"
+ #line 216 "smarty_internal_templateparser.y"
function yy_r10()
{
if ($this->php_handling == Smarty::PHP_PASSTHRU) {
@@ -3401,8 +3410,8 @@
}
}
}
- #line 2257 "smarty_internal_templateparser.php"
- #line 239 "smarty_internal_templateparser.y"
+ #line 2265 "smarty_internal_templateparser.php"
+ #line 240 "smarty_internal_templateparser.y"
function yy_r11()
{
if ($this->php_handling == Smarty::PHP_PASSTHRU) {
@@ -3423,8 +3432,8 @@
}
}
}
- #line 2278 "smarty_internal_templateparser.php"
- #line 259 "smarty_internal_templateparser.y"
+ #line 2286 "smarty_internal_templateparser.php"
+ #line 260 "smarty_internal_templateparser.y"
function yy_r12()
{
if ($this->strip) {
@@ -3433,8 +3442,8 @@
$this->_retvalue = new _smarty_text($this,
self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor));
}
}
- #line 2287 "smarty_internal_templateparser.php"
- #line 268 "smarty_internal_templateparser.y"
+ #line 2295 "smarty_internal_templateparser.php"
+ #line 269 "smarty_internal_templateparser.y"
function yy_r13()
{
$this->compiler->tag_nocache = true;
@@ -3443,8 +3452,8 @@
$this->_retvalue = new _smarty_text($this,
$this->compiler->processNocacheCode("<?php echo '<?xml';?>",
$this->compiler, true));
$this->template->has_nocache_code = $save;
}
- #line 2296 "smarty_internal_templateparser.php"
- #line 277 "smarty_internal_templateparser.y"
+ #line 2304 "smarty_internal_templateparser.php"
+ #line 278 "smarty_internal_templateparser.y"
function yy_r14()
{
if ($this->strip) {
@@ -3453,20 +3462,20 @@
$this->_retvalue = new _smarty_text($this,
$this->yystack[$this->yyidx + 0]->minor);
}
}
- #line 2305 "smarty_internal_templateparser.php"
- #line 286 "smarty_internal_templateparser.y"
+ #line 2313 "smarty_internal_templateparser.php"
+ #line 287 "smarty_internal_templateparser.y"
function yy_r15()
{
$this->strip = true;
}
- #line 2310 "smarty_internal_templateparser.php"
- #line 290 "smarty_internal_templateparser.y"
+ #line 2318 "smarty_internal_templateparser.php"
+ #line 291 "smarty_internal_templateparser.y"
function yy_r16()
{
$this->strip = false;
}
- #line 2315 "smarty_internal_templateparser.php"
- #line 294 "smarty_internal_templateparser.y"
+ #line 2323 "smarty_internal_templateparser.php"
+ #line 295 "smarty_internal_templateparser.y"
function yy_r17()
{
if ($this->strip) {
@@ -3475,205 +3484,205 @@
SMARTY_INTERNAL_COMPILE_BLOCK::blockSource($this->compiler,
$this->yystack[$this->yyidx + 0]->minor);
}
}
- #line 2324 "smarty_internal_templateparser.php"
- #line 303 "smarty_internal_templateparser.y"
+ #line 2332 "smarty_internal_templateparser.php"
+ #line 304 "smarty_internal_templateparser.y"
function yy_r18()
{
$this->_retvalue = '';
}
- #line 2329 "smarty_internal_templateparser.php"
- #line 307 "smarty_internal_templateparser.y"
+ #line 2337 "smarty_internal_templateparser.php"
+ #line 308 "smarty_internal_templateparser.y"
function yy_r19()
{
$this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor;
}
- #line 2334 "smarty_internal_templateparser.php"
- #line 311 "smarty_internal_templateparser.y"
+ #line 2342 "smarty_internal_templateparser.php"
+ #line 312 "smarty_internal_templateparser.y"
function yy_r20()
{
$this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor .
$this->yystack[$this->yyidx + 0]->minor;
}
- #line 2339 "smarty_internal_templateparser.php"
- #line 319 "smarty_internal_templateparser.y"
+ #line 2347 "smarty_internal_templateparser.php"
+ #line 320 "smarty_internal_templateparser.y"
function yy_r22()
{
$this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;
}
- #line 2344 "smarty_internal_templateparser.php"
- #line 327 "smarty_internal_templateparser.y"
+ #line 2352 "smarty_internal_templateparser.php"
+ #line 328 "smarty_internal_templateparser.y"
function yy_r24()
{
$this->_retvalue =
self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor);
}
- #line 2349 "smarty_internal_templateparser.php"
- #line 335 "smarty_internal_templateparser.y"
+ #line 2357 "smarty_internal_templateparser.php"
+ #line 336 "smarty_internal_templateparser.y"
function yy_r26()
{
$this->_retvalue =
self::escape_end_tag($this->yystack[$this->yyidx + 0]->minor);
}
- #line 2354 "smarty_internal_templateparser.php"
- #line 339 "smarty_internal_templateparser.y"
+ #line 2362 "smarty_internal_templateparser.php"
+ #line 340 "smarty_internal_templateparser.y"
function yy_r27()
{
$this->_retvalue = '<<?php ?>%';
}
- #line 2359 "smarty_internal_templateparser.php"
- #line 343 "smarty_internal_templateparser.y"
+ #line 2367 "smarty_internal_templateparser.php"
+ #line 344 "smarty_internal_templateparser.y"
function yy_r28()
{
$this->_retvalue = '%<?php ?>>';
}
- #line 2364 "smarty_internal_templateparser.php"
- #line 352 "smarty_internal_templateparser.y"
+ #line 2372 "smarty_internal_templateparser.php"
+ #line 353 "smarty_internal_templateparser.y"
function yy_r29()
{
$this->_retvalue =
$this->compiler->compileTag('private_print_expression', array(),
array('value' => $this->yystack[$this->yyidx + 0]->minor));
}
- #line 2369 "smarty_internal_templateparser.php"
- #line 356 "smarty_internal_templateparser.y"
+ #line 2377 "smarty_internal_templateparser.php"
+ #line 357 "smarty_internal_templateparser.y"
function yy_r30()
{
$this->_retvalue =
$this->compiler->compileTag('private_print_expression',
$this->yystack[$this->yyidx + 0]->minor, array('value' =>
$this->yystack[$this->yyidx + - 2]->minor, 'modifierlist' =>
$this->yystack[$this->yyidx + - 1]->minor));
}
- #line 2374 "smarty_internal_templateparser.php"
- #line 360 "smarty_internal_templateparser.y"
+ #line 2382 "smarty_internal_templateparser.php"
+ #line 361 "smarty_internal_templateparser.y"
function yy_r31()
{
$this->_retvalue =
$this->compiler->compileTag('private_print_expression',
$this->yystack[$this->yyidx + 0]->minor, array('value' =>
$this->yystack[$this->yyidx + - 1]->minor));
}
- #line 2379 "smarty_internal_templateparser.php"
- #line 364 "smarty_internal_templateparser.y"
+ #line 2387 "smarty_internal_templateparser.php"
+ #line 365 "smarty_internal_templateparser.y"
function yy_r32()
{
$this->_retvalue =
$this->compiler->compileTag('private_print_expression',
$this->yystack[$this->yyidx + 0]->minor, array('value' =>
$this->yystack[$this->yyidx + - 2]->minor, 'modifierlist' =>
$this->yystack[$this->yyidx + - 1]->minor));
}
- #line 2384 "smarty_internal_templateparser.php"
- #line 377 "smarty_internal_templateparser.y"
+ #line 2392 "smarty_internal_templateparser.php"
+ #line 378 "smarty_internal_templateparser.y"
function yy_r34()
{
$this->_retvalue = $this->compiler->compileTag('assign',
array(array('value' => $this->yystack[$this->yyidx + 0]->minor),
array('var' => "'" . $this->yystack[$this->yyidx + - 2]->minor . "'")));
}
- #line 2389 "smarty_internal_templateparser.php"
- #line 385 "smarty_internal_templateparser.y"
+ #line 2397 "smarty_internal_templateparser.php"
+ #line 386 "smarty_internal_templateparser.y"
function yy_r36()
{
$this->_retvalue = $this->compiler->compileTag('assign',
array_merge(array(array('value' => $this->yystack[$this->yyidx + -
1]->minor), array('var' => "'" . $this->yystack[$this->yyidx + -
3]->minor . "'")), $this->yystack[$this->yyidx + 0]->minor));
}
- #line 2394 "smarty_internal_templateparser.php"
- #line 389 "smarty_internal_templateparser.y"
+ #line 2402 "smarty_internal_templateparser.php"
+ #line 390 "smarty_internal_templateparser.y"
function yy_r37()
{
$this->_retvalue = $this->compiler->compileTag('assign',
array_merge(array(array('value' => $this->yystack[$this->yyidx + -
1]->minor), array('var' => $this->yystack[$this->yyidx + -
3]->minor['var'])), $this->yystack[$this->yyidx + 0]->minor),
array('smarty_internal_index' => $this->yystack[$this->yyidx + -
3]->minor['smarty_internal_index']));
}
- #line 2399 "smarty_internal_templateparser.php"
- #line 394 "smarty_internal_templateparser.y"
+ #line 2407 "smarty_internal_templateparser.php"
+ #line 395 "smarty_internal_templateparser.y"
function yy_r38()
{
$this->_retvalue =
$this->compiler->compileTag($this->yystack[$this->yyidx + - 1]->minor,
$this->yystack[$this->yyidx + 0]->minor);
}
- #line 2404 "smarty_internal_templateparser.php"
- #line 398 "smarty_internal_templateparser.y"
+ #line 2412 "smarty_internal_templateparser.php"
+ #line 399 "smarty_internal_templateparser.y"
function yy_r39()
{
$this->_retvalue =
$this->compiler->compileTag($this->yystack[$this->yyidx + 0]->minor,
array());
}
- #line 2409 "smarty_internal_templateparser.php"
- #line 403 "smarty_internal_templateparser.y"
+ #line 2417 "smarty_internal_templateparser.php"
+ #line 404 "smarty_internal_templateparser.y"
function yy_r40()
{
$this->_retvalue =
$this->compiler->compileTag($this->yystack[$this->yyidx + - 3]->minor,
$this->yystack[$this->yyidx + 0]->minor, array('object_method' =>
$this->yystack[$this->yyidx + - 1]->minor));
}
- #line 2414 "smarty_internal_templateparser.php"
- #line 408 "smarty_internal_templateparser.y"
+ #line 2422 "smarty_internal_templateparser.php"
+ #line 409 "smarty_internal_templateparser.y"
function yy_r41()
{
$this->_retvalue = '<?php ob_start();?>' .
$this->compiler->compileTag($this->yystack[$this->yyidx + - 2]->minor,
$this->yystack[$this->yyidx + 0]->minor) . '<?php echo ';
$this->_retvalue .=
$this->compiler->compileTag('private_modifier', array(),
array('modifierlist' => $this->yystack[$this->yyidx + - 1]->minor, 'value'
=> 'ob_get_clean()')) . '?>';
}
- #line 2420 "smarty_internal_templateparser.php"
- #line 414 "smarty_internal_templateparser.y"
+ #line 2428 "smarty_internal_templateparser.php"
+ #line 415 "smarty_internal_templateparser.y"
function yy_r42()
{
$this->_retvalue = '<?php ob_start();?>' .
$this->compiler->compileTag($this->yystack[$this->yyidx + - 4]->minor,
$this->yystack[$this->yyidx + 0]->minor, array('object_method' =>
$this->yystack[$this->yyidx + - 2]->minor)) . '<?php echo ';
$this->_retvalue .=
$this->compiler->compileTag('private_modifier', array(),
array('modifierlist' => $this->yystack[$this->yyidx + - 1]->minor, 'value'
=> 'ob_get_clean()')) . '?>';
}
- #line 2426 "smarty_internal_templateparser.php"
- #line 420 "smarty_internal_templateparser.y"
+ #line 2434 "smarty_internal_templateparser.php"
+ #line 421 "smarty_internal_templateparser.y"
function yy_r43()
{
$tag = trim(substr($this->yystack[$this->yyidx + - 1]->minor,
$this->lex->ldel_length));
$this->_retvalue = $this->compiler->compileTag(($tag == 'else
if') ? 'elseif' : $tag, array(), array('if condition' =>
$this->yystack[$this->yyidx + 0]->minor));
}
- #line 2432 "smarty_internal_templateparser.php"
- #line 425 "smarty_internal_templateparser.y"
+ #line 2440 "smarty_internal_templateparser.php"
+ #line 426 "smarty_internal_templateparser.y"
function yy_r44()
{
$tag = trim(substr($this->yystack[$this->yyidx + - 2]->minor,
$this->lex->ldel_length));
$this->_retvalue = $this->compiler->compileTag(($tag == 'else
if') ? 'elseif' : $tag, $this->yystack[$this->yyidx + 0]->minor, array('if
condition' => $this->yystack[$this->yyidx + - 1]->minor));
}
- #line 2438 "smarty_internal_templateparser.php"
- #line 430 "smarty_internal_templateparser.y"
+ #line 2446 "smarty_internal_templateparser.php"
+ #line 431 "smarty_internal_templateparser.y"
function yy_r45()
{
$tag = trim(substr($this->yystack[$this->yyidx + - 1]->minor,
$this->lex->ldel_length));
$this->_retvalue = $this->compiler->compileTag(($tag == 'else
if') ? 'elseif' : $tag, array(), array('if condition' =>
$this->yystack[$this->yyidx + 0]->minor));
}
- #line 2444 "smarty_internal_templateparser.php"
- #line 441 "smarty_internal_templateparser.y"
+ #line 2452 "smarty_internal_templateparser.php"
+ #line 442 "smarty_internal_templateparser.y"
function yy_r47()
{
$this->_retvalue = $this->compiler->compileTag('for',
array_merge($this->yystack[$this->yyidx + 0]->minor, array(array('start' =>
$this->yystack[$this->yyidx + - 9]->minor), array('ifexp' =>
$this->yystack[$this->yyidx + - 6]->minor), array('var' =>
$this->yystack[$this->yyidx + - 2]->minor), array('step' =>
$this->yystack[$this->yyidx + - 1]->minor))), 1);
}
- #line 2449 "smarty_internal_templateparser.php"
- #line 445 "smarty_internal_templateparser.y"
+ #line 2457 "smarty_internal_templateparser.php"
+ #line 446 "smarty_internal_templateparser.y"
function yy_r48()
{
$this->_retvalue = '=' . $this->yystack[$this->yyidx + 0]->minor;
}
- #line 2454 "smarty_internal_templateparser.php"
- #line 453 "smarty_internal_templateparser.y"
+ #line 2462 "smarty_internal_templateparser.php"
+ #line 454 "smarty_internal_templateparser.y"
function yy_r50()
{
$this->_retvalue = $this->compiler->compileTag('for',
array_merge($this->yystack[$this->yyidx + 0]->minor, array(array('start' =>
$this->yystack[$this->yyidx + - 3]->minor), array('to' =>
$this->yystack[$this->yyidx + - 1]->minor))), 0);
}
- #line 2459 "smarty_internal_templateparser.php"
- #line 457 "smarty_internal_templateparser.y"
+ #line 2467 "smarty_internal_templateparser.php"
+ #line 458 "smarty_internal_templateparser.y"
function yy_r51()
{
$this->_retvalue = $this->compiler->compileTag('for',
array_merge($this->yystack[$this->yyidx + 0]->minor, array(array('start' =>
$this->yystack[$this->yyidx + - 5]->minor), array('to' =>
$this->yystack[$this->yyidx + - 3]->minor), array('step' =>
$this->yystack[$this->yyidx + - 1]->minor))), 0);
}
- #line 2464 "smarty_internal_templateparser.php"
- #line 462 "smarty_internal_templateparser.y"
+ #line 2472 "smarty_internal_templateparser.php"
+ #line 463 "smarty_internal_templateparser.y"
function yy_r52()
{
$this->_retvalue = $this->compiler->compileTag('foreach',
$this->yystack[$this->yyidx + 0]->minor);
}
- #line 2469 "smarty_internal_templateparser.php"
- #line 467 "smarty_internal_templateparser.y"
+ #line 2477 "smarty_internal_templateparser.php"
+ #line 468 "smarty_internal_templateparser.y"
function yy_r53()
{
$this->_retvalue = $this->compiler->compileTag('foreach',
array_merge($this->yystack[$this->yyidx + 0]->minor, array(array('from' =>
$this->yystack[$this->yyidx + - 4]->minor), array('item' =>
$this->yystack[$this->yyidx + - 1]->minor))));
}
- #line 2474 "smarty_internal_templateparser.php"
- #line 471 "smarty_internal_templateparser.y"
+ #line 2482 "smarty_internal_templateparser.php"
+ #line 472 "smarty_internal_templateparser.y"
function yy_r54()
{
$this->_retvalue = $this->compiler->compileTag('foreach',
array_merge($this->yystack[$this->yyidx + 0]->minor, array(array('from' =>
$this->yystack[$this->yyidx + - 7]->minor), array('item' =>
$this->yystack[$this->yyidx + - 1]->minor), array('key' =>
$this->yystack[$this->yyidx + - 4]->minor))));
}
- #line 2479 "smarty_internal_templateparser.php"
- #line 484 "smarty_internal_templateparser.y"
+ #line 2487 "smarty_internal_templateparser.php"
+ #line 485 "smarty_internal_templateparser.y"
function yy_r57()
{
$this->_retvalue = $this->compiler->compileTag('setfilter',
array(), array('modifier_list' =>
array(array_merge(array($this->yystack[$this->yyidx + - 1]->minor),
$this->yystack[$this->yyidx + 0]->minor))));
}
- #line 2484 "smarty_internal_templateparser.php"
- #line 488 "smarty_internal_templateparser.y"
+ #line 2492 "smarty_internal_templateparser.php"
+ #line 489 "smarty_internal_templateparser.y"
function yy_r58()
{
$this->_retvalue = $this->compiler->compileTag('setfilter',
array(), array('modifier_list' =>
array_merge(array(array_merge(array($this->yystack[$this->yyidx + -
2]->minor), $this->yystack[$this->yyidx + - 1]->minor)),
$this->yystack[$this->yyidx + 0]->minor)));
}
- #line 2489 "smarty_internal_templateparser.php"
- #line 493 "smarty_internal_templateparser.y"
+ #line 2497 "smarty_internal_templateparser.php"
+ #line 494 "smarty_internal_templateparser.y"
function yy_r59()
{
$j = strrpos($this->yystack[$this->yyidx + 0]->minor, '.');
@@ -3685,51 +3694,51 @@
$this->_retvalue =
SMARTY_INTERNAL_COMPILE_BLOCK::compileParentBlock($this->compiler);
}
}
- #line 2501 "smarty_internal_templateparser.php"
- #line 506 "smarty_internal_templateparser.y"
+ #line 2509 "smarty_internal_templateparser.php"
+ #line 507 "smarty_internal_templateparser.y"
function yy_r60()
{
$this->_retvalue =
$this->compiler->compileTag($this->yystack[$this->yyidx +
0]->minor . 'close', array());
}
- #line 2506 "smarty_internal_templateparser.php"
- #line 510 "smarty_internal_templateparser.y"
+ #line 2514 "smarty_internal_templateparser.php"
+ #line 511 "smarty_internal_templateparser.y"
function yy_r61()
{
$this->_retvalue =
$this->compiler->compileTag($this->yystack[$this->yyidx + -
1]->minor . 'close', array(), array('modifier_list' =>
$this->yystack[$this->yyidx + 0]->minor));
}
- #line 2511 "smarty_internal_templateparser.php"
- #line 515 "smarty_internal_templateparser.y"
+ #line 2519 "smarty_internal_templateparser.php"
+ #line 516 "smarty_internal_templateparser.y"
function yy_r62()
{
$this->_retvalue =
$this->compiler->compileTag($this->yystack[$this->yyidx + -
2]->minor . 'close', array(), array('object_method' =>
$this->yystack[$this->yyidx + 0]->minor));
}
- #line 2516 "smarty_internal_templateparser.php"
- #line 519 "smarty_internal_templateparser.y"
+ #line 2524 "smarty_internal_templateparser.php"
+ #line 520 "smarty_internal_templateparser.y"
function yy_r63()
{
$this->_retvalue =
$this->compiler->compileTag($this->yystack[$this->yyidx + -
3]->minor . 'close', array(), array('object_method' =>
$this->yystack[$this->yyidx + - 1]->minor, 'modifier_list' =>
$this->yystack[$this->yyidx + 0]->minor));
}
- #line 2521 "smarty_internal_templateparser.php"
- #line 527 "smarty_internal_templateparser.y"
+ #line 2529 "smarty_internal_templateparser.php"
+ #line 528 "smarty_internal_templateparser.y"
function yy_r64()
{
$this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor;
$this->_retvalue[] = $this->yystack[$this->yyidx + 0]->minor;
}
- #line 2527 "smarty_internal_templateparser.php"
- #line 533 "smarty_internal_templateparser.y"
+ #line 2535 "smarty_internal_templateparser.php"
+ #line 534 "smarty_internal_templateparser.y"
function yy_r65()
{
$this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor);
}
- #line 2532 "smarty_internal_templateparser.php"
- #line 538 "smarty_internal_templateparser.y"
+ #line 2540 "smarty_internal_templateparser.php"
+ #line 539 "smarty_internal_templateparser.y"
function yy_r66()
{
$this->_retvalue = array();
}
- #line 2537 "smarty_internal_templateparser.php"
- #line 543 "smarty_internal_templateparser.y"
+ #line 2545 "smarty_internal_templateparser.php"
+ #line 544 "smarty_internal_templateparser.y"
function yy_r67()
{
if (preg_match('~^true$~i', $this->yystack[$this->yyidx +
0]->minor)) {
@@ -3742,155 +3751,155 @@
$this->_retvalue = array($this->yystack[$this->yyidx + -
2]->minor => "'" . $this->yystack[$this->yyidx + 0]->minor . "'");
}
}
- #line 2550 "smarty_internal_templateparser.php"
- #line 555 "smarty_internal_templateparser.y"
+ #line 2558 "smarty_internal_templateparser.php"
+ #line 556 "smarty_internal_templateparser.y"
function yy_r68()
{
$this->_retvalue = array(trim($this->yystack[$this->yyidx + -
1]->minor, " =\n\r\t") => $this->yystack[$this->yyidx + 0]->minor);
}
- #line 2555 "smarty_internal_templateparser.php"
- #line 563 "smarty_internal_templateparser.y"
+ #line 2563 "smarty_internal_templateparser.php"
+ #line 564 "smarty_internal_templateparser.y"
function yy_r70()
{
$this->_retvalue = "'" . $this->yystack[$this->yyidx +
0]->minor . "'";
}
- #line 2560 "smarty_internal_templateparser.php"
- #line 575 "smarty_internal_templateparser.y"
+ #line 2568 "smarty_internal_templateparser.php"
+ #line 576 "smarty_internal_templateparser.y"
function yy_r73()
{
$this->_retvalue = array($this->yystack[$this->yyidx + - 2]->minor
=> $this->yystack[$this->yyidx + 0]->minor);
}
- #line 2565 "smarty_internal_templateparser.php"
- #line 588 "smarty_internal_templateparser.y"
+ #line 2573 "smarty_internal_templateparser.php"
+ #line 589 "smarty_internal_templateparser.y"
function yy_r75()
{
$this->yystack[$this->yyidx + - 2]->minor[] =
$this->yystack[$this->yyidx + 0]->minor;
$this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor;
}
- #line 2571 "smarty_internal_templateparser.php"
- #line 593 "smarty_internal_templateparser.y"
+ #line 2579 "smarty_internal_templateparser.php"
+ #line 594 "smarty_internal_templateparser.y"
function yy_r76()
{
$this->_retvalue = array('var' => $this->yystack[$this->yyidx + -
2]->minor, 'value' => $this->yystack[$this->yyidx + 0]->minor);
}
- #line 2576 "smarty_internal_templateparser.php"
- #line 621 "smarty_internal_templateparser.y"
+ #line 2584 "smarty_internal_templateparser.php"
+ #line 622 "smarty_internal_templateparser.y"
function yy_r81()
{
$this->_retvalue = '$_smarty_tpl->getStreamVariable(\'' .
$this->yystack[$this->yyidx + - 2]->minor . '://' .
$this->yystack[$this->yyidx + 0]->minor . '\')';
}
- #line 2581 "smarty_internal_templateparser.php"
- #line 626 "smarty_internal_templateparser.y"
+ #line 2589 "smarty_internal_templateparser.php"
+ #line 627 "smarty_internal_templateparser.y"
function yy_r82()
{
$this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor .
trim($this->yystack[$this->yyidx + - 1]->minor) .
$this->yystack[$this->yyidx + 0]->minor;
}
- #line 2586 "smarty_internal_templateparser.php"
- #line 645 "smarty_internal_templateparser.y"
+ #line 2594 "smarty_internal_templateparser.php"
+ #line 646 "smarty_internal_templateparser.y"
function yy_r86()
{
$this->_retvalue = $this->compiler->compileTag('private_modifier',
array(), array('value' => $this->yystack[$this->yyidx + -
1]->minor, 'modifierlist' => $this->yystack[$this->yyidx + 0]->minor));
}
- #line 2591 "smarty_internal_templateparser.php"
- #line 651 "smarty_internal_templateparser.y"
+ #line 2599 "smarty_internal_templateparser.php"
+ #line 652 "smarty_internal_templateparser.y"
function yy_r87()
{
$this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor .
$this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx +
0]->minor;
}
- #line 2596 "smarty_internal_templateparser.php"
- #line 655 "smarty_internal_templateparser.y"
+ #line 2604 "smarty_internal_templateparser.php"
+ #line 656 "smarty_internal_templateparser.y"
function yy_r88()
{
$this->_retvalue = 'in_array(' . $this->yystack[$this->yyidx + -
2]->minor . ',' . $this->yystack[$this->yyidx + 0]->minor . ')';
}
- #line 2601 "smarty_internal_templateparser.php"
- #line 659 "smarty_internal_templateparser.y"
+ #line 2609 "smarty_internal_templateparser.php"
+ #line 660 "smarty_internal_templateparser.y"
function yy_r89()
{
$this->_retvalue = 'in_array(' . $this->yystack[$this->yyidx + -
2]->minor . ',(array)' . $this->yystack[$this->yyidx + 0]->minor . ')';
}
- #line 2606 "smarty_internal_templateparser.php"
- #line 667 "smarty_internal_templateparser.y"
+ #line 2614 "smarty_internal_templateparser.php"
+ #line 668 "smarty_internal_templateparser.y"
function yy_r91()
{
$this->_retvalue = '!(' . $this->yystack[$this->yyidx + -
2]->minor . ' % ' . $this->yystack[$this->yyidx + 0]->minor . ')';
}
- #line 2611 "smarty_internal_templateparser.php"
- #line 671 "smarty_internal_templateparser.y"
+ #line 2619 "smarty_internal_templateparser.php"
+ #line 672 "smarty_internal_templateparser.y"
function yy_r92()
{
$this->_retvalue = '(' . $this->yystack[$this->yyidx + -
2]->minor . ' % ' . $this->yystack[$this->yyidx + 0]->minor . ')';
}
- #line 2616 "smarty_internal_templateparser.php"
- #line 675 "smarty_internal_templateparser.y"
+ #line 2624 "smarty_internal_templateparser.php"
+ #line 676 "smarty_internal_templateparser.y"
function yy_r93()
{
$this->_retvalue = '!(1 & ' . $this->yystack[$this->yyidx + -
1]->minor . ')';
}
- #line 2621 "smarty_internal_templateparser.php"
- #line 679 "smarty_internal_templateparser.y"
+ #line 2629 "smarty_internal_templateparser.php"
+ #line 680 "smarty_internal_templateparser.y"
function yy_r94()
{
$this->_retvalue = '(1 & ' . $this->yystack[$this->yyidx + -
1]->minor . ')';
}
- #line 2626 "smarty_internal_templateparser.php"
- #line 683 "smarty_internal_templateparser.y"
+ #line 2634 "smarty_internal_templateparser.php"
+ #line 684 "smarty_internal_templateparser.y"
function yy_r95()
{
$this->_retvalue = '!(1 & ' . $this->yystack[$this->yyidx + -
2]->minor . ' / ' . $this->yystack[$this->yyidx + 0]->minor . ')';
}
- #line 2631 "smarty_internal_templateparser.php"
- #line 687 "smarty_internal_templateparser.y"
+ #line 2639 "smarty_internal_templateparser.php"
+ #line 688 "smarty_internal_templateparser.y"
function yy_r96()
{
$this->_retvalue = '(1 & ' . $this->yystack[$this->yyidx + -
2]->minor . ' / ' . $this->yystack[$this->yyidx + 0]->minor . ')';
}
- #line 2636 "smarty_internal_templateparser.php"
- #line 711 "smarty_internal_templateparser.y"
+ #line 2644 "smarty_internal_templateparser.php"
+ #line 712 "smarty_internal_templateparser.y"
function yy_r102()
{
self::$prefix_number ++;
$this->compiler->prefix_code[] = '<?php $_tmp' .
self::$prefix_number . '=' . $this->yystack[$this->yyidx +
0]->minor . ';?>';
$this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor .
$this->yystack[$this->yyidx + - 1]->minor . '$_tmp' . self::$prefix_number;
}
- #line 2643 "smarty_internal_templateparser.php"
- #line 720 "smarty_internal_templateparser.y"
+ #line 2651 "smarty_internal_templateparser.php"
+ #line 721 "smarty_internal_templateparser.y"
function yy_r103()
{
$this->_retvalue = $this->yystack[$this->yyidx + -
6]->minor . ' ? ' . $this->compileVariable("'" .
$this->yystack[$this->yyidx + - 2]->minor . "'") . ' : ' .
$this->yystack[$this->yyidx + 0]->minor;
}
- #line 2648 "smarty_internal_templateparser.php"
- #line 724 "smarty_internal_templateparser.y"
+ #line 2656 "smarty_internal_templateparser.php"
+ #line 725 "smarty_internal_templateparser.y"
function yy_r104()
{
$this->_retvalue = $this->yystack[$this->yyidx + -
5]->minor . ' ? ' . $this->yystack[$this->yyidx + - 2]->minor . ' : ' .
$this->yystack[$this->yyidx + 0]->minor;
}
- #line 2653 "smarty_internal_templateparser.php"
- #line 739 "smarty_internal_templateparser.y"
+ #line 2661 "smarty_internal_templateparser.php"
+ #line 740 "smarty_internal_templateparser.y"
function yy_r107()
{
$this->_retvalue = '!' . $this->yystack[$this->yyidx + 0]->minor;
}
- #line 2658 "smarty_internal_templateparser.php"
- #line 760 "smarty_internal_templateparser.y"
+ #line 2666 "smarty_internal_templateparser.php"
+ #line 761 "smarty_internal_templateparser.y"
function yy_r112()
{
$this->_retvalue = $this->yystack[$this->yyidx + -
2]->minor . '.' . $this->yystack[$this->yyidx + 0]->minor;
}
- #line 2663 "smarty_internal_templateparser.php"
- #line 764 "smarty_internal_templateparser.y"
+ #line 2671 "smarty_internal_templateparser.php"
+ #line 765 "smarty_internal_templateparser.y"
function yy_r113()
{
$this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . '.';
}
- #line 2668 "smarty_internal_templateparser.php"
- #line 768 "smarty_internal_templateparser.y"
+ #line 2676 "smarty_internal_templateparser.php"
+ #line 769 "smarty_internal_templateparser.y"
function yy_r114()
{
$this->_retvalue = '.' . $this->yystack[$this->yyidx + 0]->minor;
}
- #line 2673 "smarty_internal_templateparser.php"
- #line 773 "smarty_internal_templateparser.y"
+ #line 2681 "smarty_internal_templateparser.php"
+ #line 774 "smarty_internal_templateparser.y"
function yy_r115()
{
if (preg_match('~^true$~i', $this->yystack[$this->yyidx +
0]->minor)) {
@@ -3903,14 +3912,14 @@
$this->_retvalue = "'" . $this->yystack[$this->yyidx +
0]->minor . "'";
}
}
- #line 2686 "smarty_internal_templateparser.php"
- #line 791 "smarty_internal_templateparser.y"
+ #line 2694 "smarty_internal_templateparser.php"
+ #line 792 "smarty_internal_templateparser.y"
function yy_r117()
{
$this->_retvalue = "(" . $this->yystack[$this->yyidx + -
1]->minor . ")";
}
- #line 2691 "smarty_internal_templateparser.php"
- #line 806 "smarty_internal_templateparser.y"
+ #line 2699 "smarty_internal_templateparser.php"
+ #line 807 "smarty_internal_templateparser.y"
function yy_r120()
{
if (!$this->security ||
isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + -
2]->minor]) ||
$this->smarty->security_policy->isTrustedStaticClass($this->yystack[$this->yyidx
+ - 2]->minor, $this->compiler)) {
@@ -3923,8 +3932,8 @@
$this->compiler->trigger_template_error("static class '" .
$this->yystack[$this->yyidx + - 2]->minor . "' is undefined or not allowed
by security setting");
}
}
- #line 2704 "smarty_internal_templateparser.php"
- #line 818 "smarty_internal_templateparser.y"
+ #line 2712 "smarty_internal_templateparser.php"
+ #line 819 "smarty_internal_templateparser.y"
function yy_r121()
{
if ($this->yystack[$this->yyidx + - 2]->minor['var']
== '\'smarty\'') {
@@ -3933,16 +3942,16 @@
$this->_retvalue =
$this->compileVariable($this->yystack[$this->yyidx + - 2]->minor['var']) .
$this->yystack[$this->yyidx + - 2]->minor['smarty_internal_index'] . '::' .
$this->yystack[$this->yyidx + 0]->minor;
}
}
- #line 2713 "smarty_internal_templateparser.php"
- #line 827 "smarty_internal_templateparser.y"
+ #line 2721 "smarty_internal_templateparser.php"
+ #line 828 "smarty_internal_templateparser.y"
function yy_r122()
{
self::$prefix_number ++;
$this->compiler->prefix_code[] = '<?php ob_start();?>' .
$this->yystack[$this->yyidx + - 1]->minor . '<?php $_tmp' .
self::$prefix_number . '=ob_get_clean();?>';
$this->_retvalue = '$_tmp' . self::$prefix_number;
}
- #line 2720 "smarty_internal_templateparser.php"
- #line 842 "smarty_internal_templateparser.y"
+ #line 2728 "smarty_internal_templateparser.php"
+ #line 843 "smarty_internal_templateparser.y"
function yy_r124()
{
if ($this->yystack[$this->yyidx + 0]->minor['var']
== '\'smarty\'') {
@@ -3955,116 +3964,116 @@
$this->_retvalue =
$this->compileVariable($this->yystack[$this->yyidx + 0]->minor['var']) .
$this->yystack[$this->yyidx + 0]->minor['smarty_internal_index'];
}
}
- #line 2733 "smarty_internal_templateparser.php"
- #line 855 "smarty_internal_templateparser.y"
+ #line 2741 "smarty_internal_templateparser.php"
+ #line 856 "smarty_internal_templateparser.y"
function yy_r125()
{
$this->_retvalue = '$_smarty_tpl->tpl_vars[' .
$this->yystack[$this->yyidx + - 2]->minor . ']->' .
$this->yystack[$this->yyidx + 0]->minor;
}
- #line 2738 "smarty_internal_templateparser.php"
- #line 865 "smarty_internal_templateparser.y"
+ #line 2746 "smarty_internal_templateparser.php"
+ #line 866 "smarty_internal_templateparser.y"
function yy_r127()
{
$this->_retvalue = '$_smarty_tpl->getConfigVariable(\'' .
$this->yystack[$this->yyidx + - 1]->minor . '\')';
}
- #line 2743 "smarty_internal_templateparser.php"
- #line 869 "smarty_internal_templateparser.y"
+ #line 2751 "smarty_internal_templateparser.php"
+ #line 870 "smarty_internal_templateparser.y"
function yy_r128()
{
$this->_retvalue = '(is_array($tmp =
$_smarty_tpl->getConfigVariable(\'' . $this->yystack[$this->yyidx + -
2]->minor . '\')) ? $tmp' . $this->yystack[$this->yyidx +
0]->minor . ' :null)';
}
- #line 2748 "smarty_internal_templateparser.php"
- #line 873 "smarty_internal_templateparser.y"
+ #line 2756 "smarty_internal_templateparser.php"
+ #line 874 "smarty_internal_templateparser.y"
function yy_r129()
{
$this->_retvalue = '$_smarty_tpl->getConfigVariable(' .
$this->yystack[$this->yyidx + - 1]->minor . ')';
}
- #line 2753 "smarty_internal_templateparser.php"
- #line 877 "smarty_internal_templateparser.y"
+ #line 2761 "smarty_internal_templateparser.php"
+ #line 878 "smarty_internal_templateparser.y"
function yy_r130()
{
$this->_retvalue = '(is_array($tmp =
$_smarty_tpl->getConfigVariable(' . $this->yystack[$this->yyidx + -
2]->minor . ')) ? $tmp' . $this->yystack[$this->yyidx + 0]->minor . ' :
null)';
}
- #line 2758 "smarty_internal_templateparser.php"
- #line 881 "smarty_internal_templateparser.y"
+ #line 2766 "smarty_internal_templateparser.php"
+ #line 882 "smarty_internal_templateparser.y"
function yy_r131()
{
$this->_retvalue = array('var' => $this->yystack[$this->yyidx + -
1]->minor, 'smarty_internal_index' => $this->yystack[$this->yyidx +
0]->minor);
}
- #line 2763 "smarty_internal_templateparser.php"
- #line 894 "smarty_internal_templateparser.y"
+ #line 2771 "smarty_internal_templateparser.php"
+ #line 895 "smarty_internal_templateparser.y"
function yy_r133()
{
return;
}
- #line 2768 "smarty_internal_templateparser.php"
- #line 900 "smarty_internal_templateparser.y"
+ #line 2776 "smarty_internal_templateparser.php"
+ #line 901 "smarty_internal_templateparser.y"
function yy_r134()
{
$this->_retvalue = '[' .
$this->compileVariable($this->yystack[$this->yyidx + 0]->minor) . ']';
}
- #line 2773 "smarty_internal_templateparser.php"
- #line 904 "smarty_internal_templateparser.y"
+ #line 2781 "smarty_internal_templateparser.php"
+ #line 905 "smarty_internal_templateparser.y"
function yy_r135()
{
$this->_retvalue = '[' .
$this->compileVariable($this->yystack[$this->yyidx + - 2]->minor) . '->' .
$this->yystack[$this->yyidx + 0]->minor . ']';
}
- #line 2778 "smarty_internal_templateparser.php"
- #line 908 "smarty_internal_templateparser.y"
+ #line 2786 "smarty_internal_templateparser.php"
+ #line 909 "smarty_internal_templateparser.y"
function yy_r136()
{
$this->_retvalue = "['" . $this->yystack[$this->yyidx +
0]->minor . "']";
}
- #line 2783 "smarty_internal_templateparser.php"
- #line 912 "smarty_internal_templateparser.y"
+ #line 2791 "smarty_internal_templateparser.php"
+ #line 913 "smarty_internal_templateparser.y"
function yy_r137()
{
$this->_retvalue = "[" . $this->yystack[$this->yyidx +
0]->minor . "]";
}
- #line 2788 "smarty_internal_templateparser.php"
- #line 916 "smarty_internal_templateparser.y"
+ #line 2796 "smarty_internal_templateparser.php"
+ #line 917 "smarty_internal_templateparser.y"
function yy_r138()
{
$this->_retvalue = "[" . $this->yystack[$this->yyidx + -
1]->minor . "]";
}
- #line 2793 "smarty_internal_templateparser.php"
- #line 921 "smarty_internal_templateparser.y"
+ #line 2801 "smarty_internal_templateparser.php"
+ #line 922 "smarty_internal_templateparser.y"
function yy_r139()
{
$this->_retvalue = '[' .
$this->compiler->compileTag('private_special_variable',
array(), '[\'section\'][\'' . $this->yystack[$this->yyidx + -
1]->minor . '\'][\'index\']') . ']';
}
- #line 2798 "smarty_internal_templateparser.php"
- #line 925 "smarty_internal_templateparser.y"
+ #line 2806 "smarty_internal_templateparser.php"
+ #line 926 "smarty_internal_templateparser.y"
function yy_r140()
{
$this->_retvalue = '[' .
$this->compiler->compileTag('private_special_variable',
array(), '[\'section\'][\'' . $this->yystack[$this->yyidx + -
3]->minor . '\'][\'' . $this->yystack[$this->yyidx + -
1]->minor . '\']') . ']';
}
- #line 2803 "smarty_internal_templateparser.php"
- #line 935 "smarty_internal_templateparser.y"
+ #line 2811 "smarty_internal_templateparser.php"
+ #line 936 "smarty_internal_templateparser.y"
function yy_r142()
{
$this->_retvalue = '[]';
}
- #line 2808 "smarty_internal_templateparser.php"
- #line 948 "smarty_internal_templateparser.y"
+ #line 2816 "smarty_internal_templateparser.php"
+ #line 949 "smarty_internal_templateparser.y"
function yy_r144()
{
$this->_retvalue = $this->yystack[$this->yyidx + -
1]->minor . '.' . $this->yystack[$this->yyidx + 0]->minor;
}
- #line 2813 "smarty_internal_templateparser.php"
- #line 953 "smarty_internal_templateparser.y"
+ #line 2821 "smarty_internal_templateparser.php"
+ #line 954 "smarty_internal_templateparser.y"
function yy_r145()
{
$this->_retvalue = '\'' . $this->yystack[$this->yyidx +
0]->minor . '\'';
}
- #line 2818 "smarty_internal_templateparser.php"
- #line 958 "smarty_internal_templateparser.y"
+ #line 2826 "smarty_internal_templateparser.php"
+ #line 959 "smarty_internal_templateparser.y"
function yy_r146()
{
$this->_retvalue = '(' . $this->yystack[$this->yyidx + -
1]->minor . ')';
}
- #line 2823 "smarty_internal_templateparser.php"
- #line 965 "smarty_internal_templateparser.y"
+ #line 2831 "smarty_internal_templateparser.php"
+ #line 966 "smarty_internal_templateparser.y"
function yy_r147()
{
if ($this->yystack[$this->yyidx + - 1]->minor['var']
== '\'smarty\'') {
@@ -4073,20 +4082,20 @@
$this->_retvalue =
$this->compileVariable($this->yystack[$this->yyidx + - 1]->minor['var']) .
$this->yystack[$this->yyidx + - 1]->minor['smarty_internal_index'] .
$this->yystack[$this->yyidx + 0]->minor;
}
}
- #line 2832 "smarty_internal_templateparser.php"
- #line 974 "smarty_internal_templateparser.y"
+ #line 2840 "smarty_internal_templateparser.php"
+ #line 975 "smarty_internal_templateparser.y"
function yy_r148()
{
$this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;
}
- #line 2837 "smarty_internal_templateparser.php"
- #line 979 "smarty_internal_templateparser.y"
+ #line 2845 "smarty_internal_templateparser.php"
+ #line 980 "smarty_internal_templateparser.y"
function yy_r149()
{
$this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor .
$this->yystack[$this->yyidx + 0]->minor;
}
- #line 2842 "smarty_internal_templateparser.php"
- #line 984 "smarty_internal_templateparser.y"
+ #line 2850 "smarty_internal_templateparser.php"
+ #line 985 "smarty_internal_templateparser.y"
function yy_r150()
{
if ($this->security && substr($this->yystack[$this->yyidx + -
1]->minor, 0, 1) == '_') {
@@ -4094,8 +4103,8 @@
}
$this->_retvalue = '->' . $this->yystack[$this->yyidx + -
1]->minor . $this->yystack[$this->yyidx + 0]->minor;
}
- #line 2850 "smarty_internal_templateparser.php"
- #line 991 "smarty_internal_templateparser.y"
+ #line 2858 "smarty_internal_templateparser.php"
+ #line 992 "smarty_internal_templateparser.y"
function yy_r151()
{
if ($this->security) {
@@ -4103,8 +4112,8 @@
}
$this->_retvalue = '->{' .
$this->compileVariable($this->yystack[$this->yyidx + - 1]->minor) .
$this->yystack[$this->yyidx + 0]->minor . '}';
}
- #line 2858 "smarty_internal_templateparser.php"
- #line 998 "smarty_internal_templateparser.y"
+ #line 2866 "smarty_internal_templateparser.php"
+ #line 999 "smarty_internal_templateparser.y"
function yy_r152()
{
if ($this->security) {
@@ -4112,8 +4121,8 @@
}
$this->_retvalue = '->{' . $this->yystack[$this->yyidx + -
2]->minor . $this->yystack[$this->yyidx + 0]->minor . '}';
}
- #line 2866 "smarty_internal_templateparser.php"
- #line 1005 "smarty_internal_templateparser.y"
+ #line 2874 "smarty_internal_templateparser.php"
+ #line 1006 "smarty_internal_templateparser.y"
function yy_r153()
{
if ($this->security) {
@@ -4121,14 +4130,14 @@
}
$this->_retvalue = '->{\'' . $this->yystack[$this->yyidx + -
4]->minor . '\'.' . $this->yystack[$this->yyidx + - 2]->minor .
$this->yystack[$this->yyidx + 0]->minor . '}';
}
- #line 2874 "smarty_internal_templateparser.php"
- #line 1013 "smarty_internal_templateparser.y"
+ #line 2882 "smarty_internal_templateparser.php"
+ #line 1014 "smarty_internal_templateparser.y"
***The diff for this file has been truncated for email.***
=======================================
--- /trunk/development/lexer/smarty_internal_templateparser.y Sun Oct 12
15:57:16 2014 UTC
+++ /trunk/development/lexer/smarty_internal_templateparser.y Tue Oct 14
21:45:05 2014 UTC
@@ -116,6 +116,7 @@
// loop of elements
template ::= template template_element(e). {
if (e != null) {
+ // because of possible code injection
$this->current_buffer->append_subtree(e);
}
}
@@ -150,21 +151,21 @@

// '<?php' | '<script language=php>' tag
template_element(res)::= PHPSTARTTAG(st). {
- if (strpos($this->lex->phpValue, '<s') === 0) {
+ if (strpos(st, '<s') === 0) {
$this->lex->is_phpScript = true;
}
if ($this->php_handling == Smarty::PHP_PASSTHRU) {
if ($this->lex->is_phpScript) {
- $s = addcslashes($this->lex->phpValue, "'");
+ $s = addcslashes(st, "'");
$this->compiler->tag_nocache = true;
$save = $this->template->has_nocache_code;
res = new _smarty_text($this,
$this->compiler->processNocacheCode("<?php echo '{$s}';?>\n", true));
$this->template->has_nocache_code = $save;
} else {
- res = new _smarty_text($this,
self::escape_start_tag($this->lex->phpValue));
+ res = new _smarty_text($this, self::escape_start_tag(st));
}
} elseif ($this->php_handling == Smarty::PHP_QUOTE) {
- res = new _smarty_text($this,
htmlspecialchars($this->lex->phpValue, ENT_QUOTES));
+ res = new _smarty_text($this, htmlspecialchars(st, ENT_QUOTES));
} elseif ($this->php_handling == Smarty::PHP_ALLOW) {
if (!($this->smarty instanceof SmartyBC)) {
$this->compiler->trigger_template_error (self::Err3);
=======================================
--- /trunk/distribution/change_log.txt Sun Oct 12 15:57:16 2014 UTC
+++ /trunk/distribution/change_log.txt Tue Oct 14 21:45:05 2014 UTC
@@ -1,4 +1,7 @@
===== 3.1.21-dev ===== (xx.xx.2014)
+ 14.10.2014
+ - bugfix any tag placed within "<script language=php>" will throw a
security exception to close all thinkable holes
+
12.10.2014
- bugfix a comment like "<script{*foo*} language=php>" bypassed
$php_handling checking (Thue Kristensen)
- bugfix change of 08.10.2014 could create E_NOTICE meassage when
using "<?php" tags
=======================================
--- /trunk/distribution/libs/sysplugins/smarty_internal_templatebase.php
Fri Jun 6 02:40:04 2014 UTC
+++ /trunk/distribution/libs/sysplugins/smarty_internal_templatebase.php
Tue Oct 14 21:45:05 2014 UTC
@@ -245,7 +245,7 @@
// loop over items, stitch back together
foreach ($cache_split as $curr_idx => $curr_split) {
// escape PHP tags in template content
- $output .= preg_replace('/(<%|%>|<\?php|<\?|
\?>)/', "<?php echo '\$1'; ?>\n", $curr_split);
+ $output .= preg_replace('/(<%|%>|<\?php|<\?|\?>|
<script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*>)/', "<?php
echo '\$1'; ?>\n", $curr_split);
if (isset($cache_parts[0][$curr_idx])) {
$_template->properties['has_nocache_code'] = true;
// remove nocache tags from cache output
=======================================
--- /trunk/distribution/libs/sysplugins/smarty_internal_templatelexer.php
Sun Oct 12 15:09:52 2014 UTC
+++ /trunk/distribution/libs/sysplugins/smarty_internal_templatelexer.php
Tue Oct 14 21:45:05 2014 UTC
@@ -21,7 +21,6 @@
public $line;
public $taglineno;
public $is_phpScript = false;
- public $phpValue = '';
public $state = 1;
public $smarty;
private $heredoc_id_stack = Array();
@@ -164,14 +163,13 @@
19 => 0,
20 => 0,
21 => 0,
- 22 => 0,
- 23 => 4,
- 28 => 0,
+ 22 => 4,
+ 27 => 0,
);
if ($this->counter >= strlen($this->data)) {
return false; // end of input
}
- $yy_global_pattern = "/\G(\\{\\})|\G(" .
$this->ldel . "\\*([\S\s]*?)\\*" . $this->rdel . ")|\G(" .
$this->ldel . "\\s*strip\\s*" . $this->rdel . ")|\G(" .
$this->ldel . "\\s*\/strip\\s*" . $this->rdel . ")|\G(" .
$this->ldel . "\\s*literal\\s*" . $this->rdel . ")|\G(" .
$this->ldel . "\\s*(if|elseif|else if|while)\\s+)|\G(" .
$this->ldel . "\\s*for\\s+)|\G(" . $this->ldel . "\\s*foreach(?![^\s]))|
\G(" . $this->ldel . "\\s*setfilter\\s+)|\G(" . $this->ldel . "\\s*\/)|
\G(" . $this->ldel . "\\s*)|
\G((<script\\s+language\\s*=\\s*[\"']?\\s*php\\s*[\"']?\\s*>)|
(<\\?(?:php\\w+|=|[a-zA-Z]+)?))|\G(\\?>)|\G(<\/script>)|\G(<\/script>)|
\G(\\s*" . $this->rdel . ")|\G(<%)|\G(%>)|\G(<(([^>]*?)(?=" .
$this->ldel . ")" . $this->ldel . "\\*([\S\s]*?)\\*" .
$this->rdel . ")+([^>]*?)(?!" . $this->ldel . ")>)|\G([\S\s])/iS";
+ $yy_global_pattern = "/\G(\\{\\})|\G(" .
$this->ldel . "\\*([\S\s]*?)\\*" . $this->rdel . ")|\G(" .
$this->ldel . "\\s*strip\\s*" . $this->rdel . ")|\G(" .
$this->ldel . "\\s*\/strip\\s*" . $this->rdel . ")|\G(" .
$this->ldel . "\\s*literal\\s*" . $this->rdel . ")|\G(" .
$this->ldel . "\\s*(if|elseif|else if|while)\\s+)|\G(" .
$this->ldel . "\\s*for\\s+)|\G(" . $this->ldel . "\\s*foreach(?![^\s]))|
\G(" . $this->ldel . "\\s*setfilter\\s+)|\G(" . $this->ldel . "\\s*\/)|
\G(" . $this->ldel . "\\s*)|
\G((<script\\s+language\\s*=\\s*[\"']?\\s*php\\s*[\"']?\\s*>)|
(<\\?(?:php\\w+|=|[a-zA-Z]+)?))|\G(\\?>)|\G(<\/script>)|\G(\\s*" .
$this->rdel . ")|\G(<%)|\G(%>)|\G(<(([^>]*?)(?=" . $this->ldel . ")" .
$this->ldel . "([\S\s]*?)" . $this->rdel . ")+([^>]*?)(?!" .
$this->ldel . ")>)|\G([\S\s])/iS";

do {
if (preg_match($yy_global_pattern, $this->data, $yymatches,
null, $this->counter)) {
@@ -339,11 +337,10 @@
function yy_r1_14($yy_subpatterns)
{

- if ($script = strpos($this->value, '<s') === 0 ||
in_array($this->value, Array('<?', '<?=', '<?php'))) {
+ if (($script = strpos($this->value, '<s') === 0) ||
in_array($this->value, Array('<?', '<?=', '<?php'))) {
if ($script) {
$this->is_phpScript = true;
}
- $this->phpValue = $this->value;
$this->token = Smarty_Internal_Templateparser::TP_PHPSTARTTAG;
} elseif ($this->value == '<?xml') {
$this->token = Smarty_Internal_Templateparser::TP_XMLTAG;
@@ -368,35 +365,27 @@
function yy_r1_19($yy_subpatterns)
{

- $this->token = Smarty_Internal_Templateparser::TP_PHPENDSCRIPT;
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
}

function yy_r1_20($yy_subpatterns)
{

- $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ $this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG;
}

function yy_r1_21($yy_subpatterns)
{

- $this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG;
+ $this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG;
}

function yy_r1_22($yy_subpatterns)
{

- $this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG;
- }
-
- function yy_r1_23($yy_subpatterns)
- {
-
- $clean =
preg_replace("/{$this->ldel}\*([\S\s]*?)\*{$this->rdel}/", '',
$this->value);
+ $clean =
preg_replace("/{$this->ldel}([\S\s]*?){$this->rdel}/", '', $this->value);
if
(preg_match("/<script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*>/",
$clean, $match)) {
- $this->phpValue = $match[0];
- $this->is_phpScript = true;
- $this->token = Smarty_Internal_Templateparser::TP_PHPSTARTTAG;
+ $this->compiler->trigger_template_error('Security error:
Illegal code injection');
} else {
preg_match("/([\S\s]*?)(?={$this->ldel})/", $this->value,
$match);
$this->value = $match[0];
@@ -404,12 +393,12 @@
}
}

- function yy_r1_28($yy_subpatterns)
+ function yy_r1_27($yy_subpatterns)
{

$phpEndScript = $this->is_phpScript ? '|<\\/script>' : '';
$to = strlen($this->data);
- preg_match("/<\?|<%|\?>|%>|
<script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*>|
<(([^>]*?)(?={$this->ldel}){$this->ldel}\*([\S\s]*?)\*{$this->rdel})+([^>]*?)(?!{$this->ldel})>|
{$this->ldel}{$phpEndScript}/", $this->data, $match, PREG_OFFSET_CAPTURE,
$this->counter);
+ preg_match("/<\?|<%|\?>|%>|
<script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*>|
<(([^>]*?)(?={$this->ldel}){$this->ldel}([\S\s]*?){$this->rdel})+([^>]*?)(?!{$this->ldel})>|
{$this->ldel}{$phpEndScript}/", $this->data, $match, PREG_OFFSET_CAPTURE,
$this->counter);
if (isset($match[0][1])) {
$to = $match[0][1];
}
@@ -993,7 +982,7 @@
if ($this->counter >= strlen($this->data)) {
return false; // end of input
}
- $yy_global_pattern = "/\G(" . $this->ldel . "\\s*literal\\s*" .
$this->rdel . ")|\G(" . $this->ldel . "\\s*\/literal\\s*" .
$this->rdel . ")|
\G((<script\\s+language\\s*=\\s*[\"']?\\s*php\\s*[\"']?\\s*>)|
(<\\?(?:php\\w+|=|[a-zA-Z]+)?))|\G(\\?>)|\G(<\/script>)|\G(<%)|\G(%>)|
\G(<(([^>]*?)(?=" . $this->ldel . ")" . $this->ldel . "\\*([\S\s]*?)\\*" .
$this->rdel . ")+([^>]*?)(?!" . $this->ldel . ")>)|\G([\S\s])/iS";
+ $yy_global_pattern = "/\G(" . $this->ldel . "\\s*literal\\s*" .
$this->rdel . ")|\G(" . $this->ldel . "\\s*\/literal\\s*" .
$this->rdel . ")|
\G((<script\\s+language\\s*=\\s*[\"']?\\s*php\\s*[\"']?\\s*>)|
(<\\?(?:php\\w+|=|[a-zA-Z]+)?))|\G(\\?>)|\G(<\/script>)|\G(<%)|\G(%>)|
\G(<(([^>]*?)(?=" . $this->ldel . ")" . $this->ldel . "([\S\s]*?)" .
$this->rdel . ")+([^>]*?)(?!" . $this->ldel . ")>)|\G([\S\s])/iS";

do {
if (preg_match($yy_global_pattern, $this->data, $yymatches,
null, $this->counter)) {
@@ -1068,7 +1057,7 @@
function yy_r3_3($yy_subpatterns)
{

- if ($script = strpos($this->value, '<s') === 0 ||
in_array($this->value, Array('<?', '<?=', '<?php'))) {
+ if (($script = strpos($this->value, '<s') === 0) ||
in_array($this->value, Array('<?', '<?=', '<?php'))) {
if ($script) {
$this->is_phpScript = true;
}
@@ -1106,11 +1095,9 @@
function yy_r3_10($yy_subpatterns)
{

- $clean =
preg_replace("/{$this->ldel}\*([\S\s]*?)\*{$this->rdel}/", '',
$this->value);
+ $clean =
preg_replace("/{$this->ldel}([\S\s]*?){$this->rdel}/", '', $this->value);
if
(preg_match("/<script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*>/",
$clean, $match)) {
- $this->phpValue = $match[0];
- $this->is_phpScript = true;
- $this->token = Smarty_Internal_Templateparser::TP_PHPSTARTTAG;
+ $this->compiler->trigger_template_error('Security error:
Illegal code injection');
} else {
preg_match("/([\S\s]*?)(?={$this->ldel})/", $this->value,
$match);
$this->value = $match[0];
@@ -1123,7 +1110,7 @@

$phpEndScript = $this->is_phpScript ? '|<\\/script>' : '';
$to = strlen($this->data);
- preg_match("/<\?|<%|\?>|%>|
<script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*>|
<(([^>]*?)(?={$this->ldel}){$this->ldel}\*([\S\s]*?)\*{$this->rdel})+([^>]*?)(?!{$this->ldel})>|
{$this->ldel}\/?literal{$this->rdel}{$phpEndScript}/", $this->data, $match,
PREG_OFFSET_CAPTURE, $this->counter);
+ preg_match("/<\?|<%|\?>|%>|
<script\s+language\s*=\s*[\"\']?\s*php\s*[\"\']?\s*>|
{$this->ldel}\/?literal{$this->rdel}{$phpEndScript}/", $this->data, $match,
PREG_OFFSET_CAPTURE, $this->counter);
if (isset($match[0][1])) {
$to = $match[0][1];
} else {
=======================================
--- /trunk/distribution/libs/sysplugins/smarty_internal_templateparser.php
Sun Oct 12 15:57:16 2014 UTC
+++ /trunk/distribution/libs/sysplugins/smarty_internal_templateparser.php
Tue Oct 14 21:45:05 2014 UTC
@@ -3062,7 +3062,7 @@
public static $yyReduceMap = array(
0 => 0,
1 => 1,
- 2 => 1,
+ 2 => 2,
4 => 4,
5 => 5,
6 => 6,
@@ -3281,7 +3281,16 @@
}
}
#line 2147 "smarty_internal_templateparser.php"
- #line 130 "smarty_internal_templateparser.y"
+ #line 117 "smarty_internal_templateparser.y"
+ function yy_r2()
+ {
+ if ($this->yystack[$this->yyidx + 0]->minor != null) {
+ // because of possible code injection
+
$this->current_buffer->append_subtree($this->yystack[$this->yyidx +
0]->minor);
+ }
+ }
+ #line 2155 "smarty_internal_templateparser.php"
+ #line 131 "smarty_internal_templateparser.y"
function yy_r4()
{
if ($this->compiler->has_code) {
@@ -3297,37 +3306,37 @@
$this->compiler->has_variable_string = false;
$this->block_nesting_level = count($this->compiler->_tag_stack);
}
- #line 2159 "smarty_internal_templateparser.php"
- #line 142 "smarty_internal_templateparser.y"
+ #line 2167 "smarty_internal_templateparser.php"
+ #line 143 "smarty_internal_templateparser.y"
function yy_r5()
{
$this->_retvalue = null;
}
- #line 2164 "smarty_internal_templateparser.php"
- #line 147 "smarty_internal_templateparser.y"
+ #line 2172 "smarty_internal_templateparser.php"
+ #line 148 "smarty_internal_templateparser.y"
function yy_r6()
{
$this->_retvalue = new _smarty_text($this,
$this->yystack[$this->yyidx + 0]->minor);
}
- #line 2169 "smarty_internal_templateparser.php"
- #line 152 "smarty_internal_templateparser.y"
+ #line 2177 "smarty_internal_templateparser.php"
+ #line 153 "smarty_internal_templateparser.y"
function yy_r7()
{
- if (strpos($this->lex->phpValue, '<s') === 0) {
+ if (strpos($this->yystack[$this->yyidx + 0]->minor, '<s') === 0) {
$this->lex->is_phpScript = true;
}
if ($this->php_handling == Smarty::PHP_PASSTHRU) {
if ($this->lex->is_phpScript) {
- $s = addcslashes($this->lex->phpValue, "'");
+ $s = addcslashes($this->yystack[$this->yyidx +
0]->minor, "'");
$this->compiler->tag_nocache = true;
$save = $this->template->has_nocache_code;
$this->_retvalue = new _smarty_text($this,
$this->compiler->processNocacheCode("<?php echo '{$s}';?>\n", true));
$this->template->has_nocache_code = $save;
} else {
- $this->_retvalue = new _smarty_text($this,
self::escape_start_tag($this->lex->phpValue));
+ $this->_retvalue = new _smarty_text($this,
self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor));
}
} elseif ($this->php_handling == Smarty::PHP_QUOTE) {
- $this->_retvalue = new _smarty_text($this,
htmlspecialchars($this->lex->phpValue, ENT_QUOTES));
+ $this->_retvalue = new _smarty_text($this,
htmlspecialchars($this->yystack[$this->yyidx + 0]->minor, ENT_QUOTES));
} elseif ($this->php_handling == Smarty::PHP_ALLOW) {
if (!($this->smarty instanceof SmartyBC)) {
$this->compiler->trigger_template_error(self::Err3);
@@ -3337,8 +3346,8 @@
$this->_retvalue = null;
}
}
- #line 2196 "smarty_internal_templateparser.php"
- #line 179 "smarty_internal_templateparser.y"
+ #line 2204 "smarty_internal_templateparser.php"
+ #line 180 "smarty_internal_templateparser.y"
function yy_r8()
{
if ($this->is_xml) {
@@ -3357,8 +3366,8 @@
$this->_retvalue = null;
}
}
- #line 2215 "smarty_internal_templateparser.php"
- #line 197 "smarty_internal_templateparser.y"
+ #line 2223 "smarty_internal_templateparser.php"
+ #line 198 "smarty_internal_templateparser.y"
function yy_r9()
{
if (!$this->lex->is_phpScript) {
@@ -3376,8 +3385,8 @@
}
}
}
- #line 2233 "smarty_internal_templateparser.php"
- #line 215 "smarty_internal_templateparser.y"
+ #line 2241 "smarty_internal_templateparser.php"
+ #line 216 "smarty_internal_templateparser.y"
function yy_r10()
{
if ($this->php_handling == Smarty::PHP_PASSTHRU) {
@@ -3401,8 +3410,8 @@
}
}
}
- #line 2257 "smarty_internal_templateparser.php"
- #line 239 "smarty_internal_templateparser.y"
+ #line 2265 "smarty_internal_templateparser.php"
+ #line 240 "smarty_internal_templateparser.y"
function yy_r11()
{
if ($this->php_handling == Smarty::PHP_PASSTHRU) {
@@ -3423,8 +3432,8 @@
}
}
}
- #line 2278 "smarty_internal_templateparser.php"
- #line 259 "smarty_internal_templateparser.y"
+ #line 2286 "smarty_internal_templateparser.php"
+ #line 260 "smarty_internal_templateparser.y"
function yy_r12()
{
if ($this->strip) {
@@ -3433,8 +3442,8 @@
$this->_retvalue = new _smarty_text($this,
self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor));
}
}
- #line 2287 "smarty_internal_templateparser.php"
- #line 268 "smarty_internal_templateparser.y"
+ #line 2295 "smarty_internal_templateparser.php"
+ #line 269 "smarty_internal_templateparser.y"
function yy_r13()
{
$this->compiler->tag_nocache = true;
@@ -3443,8 +3452,8 @@
$this->_retvalue = new _smarty_text($this,
$this->compiler->processNocacheCode("<?php echo '<?xml';?>",
$this->compiler, true));
$this->template->has_nocache_code = $save;
}
- #line 2296 "smarty_internal_templateparser.php"
- #line 277 "smarty_internal_templateparser.y"
+ #line 2304 "smarty_internal_templateparser.php"
+ #line 278 "smarty_internal_templateparser.y"
function yy_r14()
{
if ($this->strip) {
@@ -3453,20 +3462,20 @@
$this->_retvalue = new _smarty_text($this,
$this->yystack[$this->yyidx + 0]->minor);
}
}
- #line 2305 "smarty_internal_templateparser.php"
- #line 286 "smarty_internal_templateparser.y"
+ #line 2313 "smarty_internal_templateparser.php"
+ #line 287 "smarty_internal_templateparser.y"
function yy_r15()
{
$this->strip = true;
}
- #line 2310 "smarty_internal_templateparser.php"
- #line 290 "smarty_internal_templateparser.y"
+ #line 2318 "smarty_internal_templateparser.php"
+ #line 291 "smarty_internal_templateparser.y"
function yy_r16()
{
$this->strip = false;
}
- #line 2315 "smarty_internal_templateparser.php"
- #line 294 "smarty_internal_templateparser.y"
+ #line 2323 "smarty_internal_templateparser.php"
+ #line 295 "smarty_internal_templateparser.y"
function yy_r17()
{
if ($this->strip) {
@@ -3475,205 +3484,205 @@
SMARTY_INTERNAL_COMPILE_BLOCK::blockSource($this->compiler,
$this->yystack[$this->yyidx + 0]->minor);
}
}
- #line 2324 "smarty_internal_templateparser.php"
- #line 303 "smarty_internal_templateparser.y"
+ #line 2332 "smarty_internal_templateparser.php"
+ #line 304 "smarty_internal_templateparser.y"
function yy_r18()
{
$this->_retvalue = '';
}
- #line 2329 "smarty_internal_templateparser.php"
- #line 307 "smarty_internal_templateparser.y"
+ #line 2337 "smarty_internal_templateparser.php"
+ #line 308 "smarty_internal_templateparser.y"
function yy_r19()
{
$this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor;
}
- #line 2334 "smarty_internal_templateparser.php"
- #line 311 "smarty_internal_templateparser.y"
+ #line 2342 "smarty_internal_templateparser.php"
+ #line 312 "smarty_internal_templateparser.y"
function yy_r20()
{
$this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor .
$this->yystack[$this->yyidx + 0]->minor;
}
- #line 2339 "smarty_internal_templateparser.php"
- #line 319 "smarty_internal_templateparser.y"
+ #line 2347 "smarty_internal_templateparser.php"
+ #line 320 "smarty_internal_templateparser.y"
function yy_r22()
{
$this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;
}
- #line 2344 "smarty_internal_templateparser.php"
- #line 327 "smarty_internal_templateparser.y"
+ #line 2352 "smarty_internal_templateparser.php"
+ #line 328 "smarty_internal_templateparser.y"
function yy_r24()
{
$this->_retvalue =
self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor);
}
- #line 2349 "smarty_internal_templateparser.php"
- #line 335 "smarty_internal_templateparser.y"
+ #line 2357 "smarty_internal_templateparser.php"
+ #line 336 "smarty_internal_templateparser.y"
function yy_r26()
{
$this->_retvalue =
self::escape_end_tag($this->yystack[$this->yyidx + 0]->minor);
}
- #line 2354 "smarty_internal_templateparser.php"
- #line 339 "smarty_internal_templateparser.y"
+ #line 2362 "smarty_internal_templateparser.php"
+ #line 340 "smarty_internal_templateparser.y"
function yy_r27()
{
$this->_retvalue = '<<?php ?>%';
}
- #line 2359 "smarty_internal_templateparser.php"
- #line 343 "smarty_internal_templateparser.y"
+ #line 2367 "smarty_internal_templateparser.php"
+ #line 344 "smarty_internal_templateparser.y"
function yy_r28()
{
$this->_retvalue = '%<?php ?>>';
}
- #line 2364 "smarty_internal_templateparser.php"
- #line 352 "smarty_internal_templateparser.y"
+ #line 2372 "smarty_internal_templateparser.php"
+ #line 353 "smarty_internal_templateparser.y"
function yy_r29()
{
$this->_retvalue =
$this->compiler->compileTag('private_print_expression', array(),
array('value' => $this->yystack[$this->yyidx + 0]->minor));
}
- #line 2369 "smarty_internal_templateparser.php"
- #line 356 "smarty_internal_templateparser.y"
+ #line 2377 "smarty_internal_templateparser.php"
+ #line 357 "smarty_internal_templateparser.y"
function yy_r30()
{
$this->_retvalue =
$this->compiler->compileTag('private_print_expression',
$this->yystack[$this->yyidx + 0]->minor, array('value' =>
$this->yystack[$this->yyidx + - 2]->minor, 'modifierlist' =>
$this->yystack[$this->yyidx + - 1]->minor));
}
- #line 2374 "smarty_internal_templateparser.php"
- #line 360 "smarty_internal_templateparser.y"
+ #line 2382 "smarty_internal_templateparser.php"
+ #line 361 "smarty_internal_templateparser.y"
function yy_r31()
{
$this->_retvalue =
$this->compiler->compileTag('private_print_expression',
$this->yystack[$this->yyidx + 0]->minor, array('value' =>
$this->yystack[$this->yyidx + - 1]->minor));
}
- #line 2379 "smarty_internal_templateparser.php"
- #line 364 "smarty_internal_templateparser.y"
+ #line 2387 "smarty_internal_templateparser.php"
+ #line 365 "smarty_internal_templateparser.y"
function yy_r32()
{
$this->_retvalue =
$this->compiler->compileTag('private_print_expression',
$this->yystack[$this->yyidx + 0]->minor, array('value' =>
$this->yystack[$this->yyidx + - 2]->minor, 'modifierlist' =>
$this->yystack[$this->yyidx + - 1]->minor));
}
- #line 2384 "smarty_internal_templateparser.php"
- #line 377 "smarty_internal_templateparser.y"
+ #line 2392 "smarty_internal_templateparser.php"
+ #line 378 "smarty_internal_templateparser.y"
function yy_r34()
{
$this->_retvalue = $this->compiler->compileTag('assign',
array(array('value' => $this->yystack[$this->yyidx + 0]->minor),
array('var' => "'" . $this->yystack[$this->yyidx + - 2]->minor . "'")));
}
- #line 2389 "smarty_internal_templateparser.php"
- #line 385 "smarty_internal_templateparser.y"
+ #line 2397 "smarty_internal_templateparser.php"
+ #line 386 "smarty_internal_templateparser.y"
function yy_r36()
{
$this->_retvalue = $this->compiler->compileTag('assign',
array_merge(array(array('value' => $this->yystack[$this->yyidx + -
1]->minor), array('var' => "'" . $this->yystack[$this->yyidx + -
3]->minor . "'")), $this->yystack[$this->yyidx + 0]->minor));
}
- #line 2394 "smarty_internal_templateparser.php"
- #line 389 "smarty_internal_templateparser.y"
+ #line 2402 "smarty_internal_templateparser.php"
+ #line 390 "smarty_internal_templateparser.y"
function yy_r37()
{
$this->_retvalue = $this->compiler->compileTag('assign',
array_merge(array(array('value' => $this->yystack[$this->yyidx + -
1]->minor), array('var' => $this->yystack[$this->yyidx + -
3]->minor['var'])), $this->yystack[$this->yyidx + 0]->minor),
array('smarty_internal_index' => $this->yystack[$this->yyidx + -
3]->minor['smarty_internal_index']));
}
- #line 2399 "smarty_internal_templateparser.php"
- #line 394 "smarty_internal_templateparser.y"
+ #line 2407 "smarty_internal_templateparser.php"
+ #line 395 "smarty_internal_templateparser.y"
function yy_r38()
{
$this->_retvalue =
$this->compiler->compileTag($this->yystack[$this->yyidx + - 1]->minor,
$this->yystack[$this->yyidx + 0]->minor);
}
- #line 2404 "smarty_internal_templateparser.php"
- #line 398 "smarty_internal_templateparser.y"
+ #line 2412 "smarty_internal_templateparser.php"
+ #line 399 "smarty_internal_templateparser.y"
function yy_r39()
{
$this->_retvalue =
$this->compiler->compileTag($this->yystack[$this->yyidx + 0]->minor,
array());
}
- #line 2409 "smarty_internal_templateparser.php"
- #line 403 "smarty_internal_templateparser.y"
+ #line 2417 "smarty_internal_templateparser.php"
+ #line 404 "smarty_internal_templateparser.y"
function yy_r40()
{
$this->_retvalue =
$this->compiler->compileTag($this->yystack[$this->yyidx + - 3]->minor,
$this->yystack[$this->yyidx + 0]->minor, array('object_method' =>
$this->yystack[$this->yyidx + - 1]->minor));
}
- #line 2414 "smarty_internal_templateparser.php"
- #line 408 "smarty_internal_templateparser.y"
+ #line 2422 "smarty_internal_templateparser.php"
+ #line 409 "smarty_internal_templateparser.y"
function yy_r41()
{
$this->_retvalue = '<?php ob_start();?>' .
$this->compiler->compileTag($this->yystack[$this->yyidx + - 2]->minor,
$this->yystack[$this->yyidx + 0]->minor) . '<?php echo ';
$this->_retvalue .=
$this->compiler->compileTag('private_modifier', array(),
array('modifierlist' => $this->yystack[$this->yyidx + - 1]->minor, 'value'
=> 'ob_get_clean()')) . '?>';
}
- #line 2420 "smarty_internal_templateparser.php"
- #line 414 "smarty_internal_templateparser.y"
+ #line 2428 "smarty_internal_templateparser.php"
+ #line 415 "smarty_internal_templateparser.y"
function yy_r42()
{
$this->_retvalue = '<?php ob_start();?>' .
$this->compiler->compileTag($this->yystack[$this->yyidx + - 4]->minor,
$this->yystack[$this->yyidx + 0]->minor, array('object_method' =>
$this->yystack[$this->yyidx + - 2]->minor)) . '<?php echo ';
$this->_retvalue .=
$this->compiler->compileTag('private_modifier', array(),
array('modifierlist' => $this->yystack[$this->yyidx + - 1]->minor, 'value'
=> 'ob_get_clean()')) . '?>';
}
- #line 2426 "smarty_internal_templateparser.php"
- #line 420 "smarty_internal_templateparser.y"
+ #line 2434 "smarty_internal_templateparser.php"
+ #line 421 "smarty_internal_templateparser.y"
function yy_r43()
{
$tag = trim(substr($this->yystack[$this->yyidx + - 1]->minor,
$this->lex->ldel_length));
$this->_retvalue = $this->compiler->compileTag(($tag == 'else
if') ? 'elseif' : $tag, array(), array('if condition' =>
$this->yystack[$this->yyidx + 0]->minor));
}
- #line 2432 "smarty_internal_templateparser.php"
- #line 425 "smarty_internal_templateparser.y"
+ #line 2440 "smarty_internal_templateparser.php"
+ #line 426 "smarty_internal_templateparser.y"
function yy_r44()
{
$tag = trim(substr($this->yystack[$this->yyidx + - 2]->minor,
$this->lex->ldel_length));
$this->_retvalue = $this->compiler->compileTag(($tag == 'else
if') ? 'elseif' : $tag, $this->yystack[$this->yyidx + 0]->minor, array('if
condition' => $this->yystack[$this->yyidx + - 1]->minor));
}
- #line 2438 "smarty_internal_templateparser.php"
- #line 430 "smarty_internal_templateparser.y"
+ #line 2446 "smarty_internal_templateparser.php"
+ #line 431 "smarty_internal_templateparser.y"
function yy_r45()
{
$tag = trim(substr($this->yystack[$this->yyidx + - 1]->minor,
$this->lex->ldel_length));
$this->_retvalue = $this->compiler->compileTag(($tag == 'else
if') ? 'elseif' : $tag, array(), array('if condition' =>
$this->yystack[$this->yyidx + 0]->minor));
}
- #line 2444 "smarty_internal_templateparser.php"
- #line 441 "smarty_internal_templateparser.y"
+ #line 2452 "smarty_internal_templateparser.php"
+ #line 442 "smarty_internal_templateparser.y"
function yy_r47()
{
$this->_retvalue = $this->compiler->compileTag('for',
array_merge($this->yystack[$this->yyidx + 0]->minor, array(array('start' =>
$this->yystack[$this->yyidx + - 9]->minor), array('ifexp' =>
$this->yystack[$this->yyidx + - 6]->minor), array('var' =>
$this->yystack[$this->yyidx + - 2]->minor), array('step' =>
$this->yystack[$this->yyidx + - 1]->minor))), 1);
}
- #line 2449 "smarty_internal_templateparser.php"
- #line 445 "smarty_internal_templateparser.y"
+ #line 2457 "smarty_internal_templateparser.php"
+ #line 446 "smarty_internal_templateparser.y"
function yy_r48()
{
$this->_retvalue = '=' . $this->yystack[$this->yyidx + 0]->minor;
}
- #line 2454 "smarty_internal_templateparser.php"
- #line 453 "smarty_internal_templateparser.y"
+ #line 2462 "smarty_internal_templateparser.php"
+ #line 454 "smarty_internal_templateparser.y"
function yy_r50()
{
$this->_retvalue = $this->compiler->compileTag('for',
array_merge($this->yystack[$this->yyidx + 0]->minor, array(array('start' =>
$this->yystack[$this->yyidx + - 3]->minor), array('to' =>
$this->yystack[$this->yyidx + - 1]->minor))), 0);
}
- #line 2459 "smarty_internal_templateparser.php"
- #line 457 "smarty_internal_templateparser.y"
+ #line 2467 "smarty_internal_templateparser.php"
+ #line 458 "smarty_internal_templateparser.y"
function yy_r51()
{
$this->_retvalue = $this->compiler->compileTag('for',
array_merge($this->yystack[$this->yyidx + 0]->minor, array(array('start' =>
$this->yystack[$this->yyidx + - 5]->minor), array('to' =>
$this->yystack[$this->yyidx + - 3]->minor), array('step' =>
$this->yystack[$this->yyidx + - 1]->minor))), 0);
}
- #line 2464 "smarty_internal_templateparser.php"
- #line 462 "smarty_internal_templateparser.y"
+ #line 2472 "smarty_internal_templateparser.php"
+ #line 463 "smarty_internal_templateparser.y"
function yy_r52()
{
$this->_retvalue = $this->compiler->compileTag('foreach',
$this->yystack[$this->yyidx + 0]->minor);
}
- #line 2469 "smarty_internal_templateparser.php"
- #line 467 "smarty_internal_templateparser.y"
+ #line 2477 "smarty_internal_templateparser.php"
+ #line 468 "smarty_internal_templateparser.y"
function yy_r53()
{
$this->_retvalue = $this->compiler->compileTag('foreach',
array_merge($this->yystack[$this->yyidx + 0]->minor, array(array('from' =>
$this->yystack[$this->yyidx + - 4]->minor), array('item' =>
$this->yystack[$this->yyidx + - 1]->minor))));
}
- #line 2474 "smarty_internal_templateparser.php"
- #line 471 "smarty_internal_templateparser.y"
+ #line 2482 "smarty_internal_templateparser.php"
+ #line 472 "smarty_internal_templateparser.y"
function yy_r54()
{
$this->_retvalue = $this->compiler->compileTag('foreach',
array_merge($this->yystack[$this->yyidx + 0]->minor, array(array('from' =>
$this->yystack[$this->yyidx + - 7]->minor), array('item' =>
$this->yystack[$this->yyidx + - 1]->minor), array('key' =>
$this->yystack[$this->yyidx + - 4]->minor))));
}
- #line 2479 "smarty_internal_templateparser.php"
- #line 484 "smarty_internal_templateparser.y"
+ #line 2487 "smarty_internal_templateparser.php"
+ #line 485 "smarty_internal_templateparser.y"
function yy_r57()
{
$this->_retvalue = $this->compiler->compileTag('setfilter',
array(), array('modifier_list' =>
array(array_merge(array($this->yystack[$this->yyidx + - 1]->minor),
$this->yystack[$this->yyidx + 0]->minor))));
}
- #line 2484 "smarty_internal_templateparser.php"
- #line 488 "smarty_internal_templateparser.y"
+ #line 2492 "smarty_internal_templateparser.php"
+ #line 489 "smarty_internal_templateparser.y"
function yy_r58()
{
$this->_retvalue = $this->compiler->compileTag('setfilter',
array(), array('modifier_list' =>
array_merge(array(array_merge(array($this->yystack[$this->yyidx + -
2]->minor), $this->yystack[$this->yyidx + - 1]->minor)),
$this->yystack[$this->yyidx + 0]->minor)));
}
- #line 2489 "smarty_internal_templateparser.php"
- #line 493 "smarty_internal_templateparser.y"
+ #line 2497 "smarty_internal_templateparser.php"
+ #line 494 "smarty_internal_templateparser.y"
function yy_r59()
{
$j = strrpos($this->yystack[$this->yyidx + 0]->minor, '.');
@@ -3685,51 +3694,51 @@
$this->_retvalue =
SMARTY_INTERNAL_COMPILE_BLOCK::compileParentBlock($this->compiler);
}
}
- #line 2501 "smarty_internal_templateparser.php"
- #line 506 "smarty_internal_templateparser.y"
+ #line 2509 "smarty_internal_templateparser.php"
+ #line 507 "smarty_internal_templateparser.y"
function yy_r60()
{
$this->_retvalue =
$this->compiler->compileTag($this->yystack[$this->yyidx +
0]->minor . 'close', array());
}
- #line 2506 "smarty_internal_templateparser.php"
- #line 510 "smarty_internal_templateparser.y"
+ #line 2514 "smarty_internal_templateparser.php"
+ #line 511 "smarty_internal_templateparser.y"
function yy_r61()
{
$this->_retvalue =
$this->compiler->compileTag($this->yystack[$this->yyidx + -
1]->minor . 'close', array(), array('modifier_list' =>
$this->yystack[$this->yyidx + 0]->minor));
}
- #line 2511 "smarty_internal_templateparser.php"
- #line 515 "smarty_internal_templateparser.y"
+ #line 2519 "smarty_internal_templateparser.php"
+ #line 516 "smarty_internal_templateparser.y"
function yy_r62()
{
$this->_retvalue =
$this->compiler->compileTag($this->yystack[$this->yyidx + -
2]->minor . 'close', array(), array('object_method' =>
$this->yystack[$this->yyidx + 0]->minor));
}
- #line 2516 "smarty_internal_templateparser.php"
- #line 519 "smarty_internal_templateparser.y"
+ #line 2524 "smarty_internal_templateparser.php"
+ #line 520 "smarty_internal_templateparser.y"
function yy_r63()
{
$this->_retvalue =
$this->compiler->compileTag($this->yystack[$this->yyidx + -
3]->minor . 'close', array(), array('object_method' =>
$this->yystack[$this->yyidx + - 1]->minor, 'modifier_list' =>
$this->yystack[$this->yyidx + 0]->minor));
}
- #line 2521 "smarty_internal_templateparser.php"
- #line 527 "smarty_internal_templateparser.y"
+ #line 2529 "smarty_internal_templateparser.php"
+ #line 528 "smarty_internal_templateparser.y"
function yy_r64()
{
$this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor;
$this->_retvalue[] = $this->yystack[$this->yyidx + 0]->minor;
}
- #line 2527 "smarty_internal_templateparser.php"
- #line 533 "smarty_internal_templateparser.y"
+ #line 2535 "smarty_internal_templateparser.php"
+ #line 534 "smarty_internal_templateparser.y"
function yy_r65()
{
$this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor);
}
- #line 2532 "smarty_internal_templateparser.php"
- #line 538 "smarty_internal_templateparser.y"
+ #line 2540 "smarty_internal_templateparser.php"
+ #line 539 "smarty_internal_templateparser.y"
function yy_r66()
{
$this->_retvalue = array();
}
- #line 2537 "smarty_internal_templateparser.php"
- #line 543 "smarty_internal_templateparser.y"
+ #line 2545 "smarty_internal_templateparser.php"
+ #line 544 "smarty_internal_templateparser.y"
function yy_r67()
{
if (preg_match('~^true$~i', $this->yystack[$this->yyidx +
0]->minor)) {
@@ -3742,155 +3751,155 @@
$this->_retvalue = array($this->yystack[$this->yyidx + -
2]->minor => "'" . $this->yystack[$this->yyidx + 0]->minor . "'");
}
}
- #line 2550 "smarty_internal_templateparser.php"
- #line 555 "smarty_internal_templateparser.y"
+ #line 2558 "smarty_internal_templateparser.php"
+ #line 556 "smarty_internal_templateparser.y"
function yy_r68()
{
$this->_retvalue = array(trim($this->yystack[$this->yyidx + -
1]->minor, " =\n\r\t") => $this->yystack[$this->yyidx + 0]->minor);
}
- #line 2555 "smarty_internal_templateparser.php"
- #line 563 "smarty_internal_templateparser.y"
+ #line 2563 "smarty_internal_templateparser.php"
+ #line 564 "smarty_internal_templateparser.y"
function yy_r70()
{
$this->_retvalue = "'" . $this->yystack[$this->yyidx +
0]->minor . "'";
}
- #line 2560 "smarty_internal_templateparser.php"
- #line 575 "smarty_internal_templateparser.y"
+ #line 2568 "smarty_internal_templateparser.php"
+ #line 576 "smarty_internal_templateparser.y"
function yy_r73()
{
$this->_retvalue = array($this->yystack[$this->yyidx + - 2]->minor
=> $this->yystack[$this->yyidx + 0]->minor);
}
- #line 2565 "smarty_internal_templateparser.php"
- #line 588 "smarty_internal_templateparser.y"
+ #line 2573 "smarty_internal_templateparser.php"
+ #line 589 "smarty_internal_templateparser.y"
function yy_r75()
{
$this->yystack[$this->yyidx + - 2]->minor[] =
$this->yystack[$this->yyidx + 0]->minor;
$this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor;
}
- #line 2571 "smarty_internal_templateparser.php"
- #line 593 "smarty_internal_templateparser.y"
+ #line 2579 "smarty_internal_templateparser.php"
+ #line 594 "smarty_internal_templateparser.y"
function yy_r76()
{
$this->_retvalue = array('var' => $this->yystack[$this->yyidx + -
2]->minor, 'value' => $this->yystack[$this->yyidx + 0]->minor);
}
- #line 2576 "smarty_internal_templateparser.php"
- #line 621 "smarty_internal_templateparser.y"
+ #line 2584 "smarty_internal_templateparser.php"
+ #line 622 "smarty_internal_templateparser.y"
function yy_r81()
{
$this->_retvalue = '$_smarty_tpl->getStreamVariable(\'' .
$this->yystack[$this->yyidx + - 2]->minor . '://' .
$this->yystack[$this->yyidx + 0]->minor . '\')';
}
- #line 2581 "smarty_internal_templateparser.php"
- #line 626 "smarty_internal_templateparser.y"
+ #line 2589 "smarty_internal_templateparser.php"
+ #line 627 "smarty_internal_templateparser.y"
function yy_r82()
{
$this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor .
trim($this->yystack[$this->yyidx + - 1]->minor) .
$this->yystack[$this->yyidx + 0]->minor;
}
- #line 2586 "smarty_internal_templateparser.php"
- #line 645 "smarty_internal_templateparser.y"
+ #line 2594 "smarty_internal_templateparser.php"
+ #line 646 "smarty_internal_templateparser.y"
function yy_r86()
{
$this->_retvalue = $this->compiler->compileTag('private_modifier',
array(), array('value' => $this->yystack[$this->yyidx + -
1]->minor, 'modifierlist' => $this->yystack[$this->yyidx + 0]->minor));
}
- #line 2591 "smarty_internal_templateparser.php"
- #line 651 "smarty_internal_templateparser.y"
+ #line 2599 "smarty_internal_templateparser.php"
+ #line 652 "smarty_internal_templateparser.y"
function yy_r87()
{
$this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor .
$this->yystack[$this->yyidx + - 1]->minor . $this->yystack[$this->yyidx +
0]->minor;
}
- #line 2596 "smarty_internal_templateparser.php"
- #line 655 "smarty_internal_templateparser.y"
+ #line 2604 "smarty_internal_templateparser.php"
+ #line 656 "smarty_internal_templateparser.y"
function yy_r88()
{
$this->_retvalue = 'in_array(' . $this->yystack[$this->yyidx + -
2]->minor . ',' . $this->yystack[$this->yyidx + 0]->minor . ')';
}
- #line 2601 "smarty_internal_templateparser.php"
- #line 659 "smarty_internal_templateparser.y"
+ #line 2609 "smarty_internal_templateparser.php"
+ #line 660 "smarty_internal_templateparser.y"
function yy_r89()
{
$this->_retvalue = 'in_array(' . $this->yystack[$this->yyidx + -
2]->minor . ',(array)' . $this->yystack[$this->yyidx + 0]->minor . ')';
}
- #line 2606 "smarty_internal_templateparser.php"
- #line 667 "smarty_internal_templateparser.y"
+ #line 2614 "smarty_internal_templateparser.php"
+ #line 668 "smarty_internal_templateparser.y"
function yy_r91()
{
$this->_retvalue = '!(' . $this->yystack[$this->yyidx + -
2]->minor . ' % ' . $this->yystack[$this->yyidx + 0]->minor . ')';
}
- #line 2611 "smarty_internal_templateparser.php"
- #line 671 "smarty_internal_templateparser.y"
+ #line 2619 "smarty_internal_templateparser.php"
+ #line 672 "smarty_internal_templateparser.y"
function yy_r92()
{
$this->_retvalue = '(' . $this->yystack[$this->yyidx + -
2]->minor . ' % ' . $this->yystack[$this->yyidx + 0]->minor . ')';
}
- #line 2616 "smarty_internal_templateparser.php"
- #line 675 "smarty_internal_templateparser.y"
+ #line 2624 "smarty_internal_templateparser.php"
+ #line 676 "smarty_internal_templateparser.y"
function yy_r93()
{
$this->_retvalue = '!(1 & ' . $this->yystack[$this->yyidx + -
1]->minor . ')';
}
- #line 2621 "smarty_internal_templateparser.php"
- #line 679 "smarty_internal_templateparser.y"
+ #line 2629 "smarty_internal_templateparser.php"
+ #line 680 "smarty_internal_templateparser.y"
function yy_r94()
{
$this->_retvalue = '(1 & ' . $this->yystack[$this->yyidx + -
1]->minor . ')';
}
- #line 2626 "smarty_internal_templateparser.php"
- #line 683 "smarty_internal_templateparser.y"
+ #line 2634 "smarty_internal_templateparser.php"
+ #line 684 "smarty_internal_templateparser.y"
function yy_r95()
{
$this->_retvalue = '!(1 & ' . $this->yystack[$this->yyidx + -
2]->minor . ' / ' . $this->yystack[$this->yyidx + 0]->minor . ')';
}
- #line 2631 "smarty_internal_templateparser.php"
- #line 687 "smarty_internal_templateparser.y"
+ #line 2639 "smarty_internal_templateparser.php"
+ #line 688 "smarty_internal_templateparser.y"
function yy_r96()
{
$this->_retvalue = '(1 & ' . $this->yystack[$this->yyidx + -
2]->minor . ' / ' . $this->yystack[$this->yyidx + 0]->minor . ')';
}
- #line 2636 "smarty_internal_templateparser.php"
- #line 711 "smarty_internal_templateparser.y"
+ #line 2644 "smarty_internal_templateparser.php"
+ #line 712 "smarty_internal_templateparser.y"
function yy_r102()
{
self::$prefix_number ++;
$this->compiler->prefix_code[] = '<?php $_tmp' .
self::$prefix_number . '=' . $this->yystack[$this->yyidx +
0]->minor . ';?>';
$this->_retvalue = $this->yystack[$this->yyidx + - 2]->minor .
$this->yystack[$this->yyidx + - 1]->minor . '$_tmp' . self::$prefix_number;
}
- #line 2643 "smarty_internal_templateparser.php"
- #line 720 "smarty_internal_templateparser.y"
+ #line 2651 "smarty_internal_templateparser.php"
+ #line 721 "smarty_internal_templateparser.y"
function yy_r103()
{
$this->_retvalue = $this->yystack[$this->yyidx + -
6]->minor . ' ? ' . $this->compileVariable("'" .
$this->yystack[$this->yyidx + - 2]->minor . "'") . ' : ' .
$this->yystack[$this->yyidx + 0]->minor;
}
- #line 2648 "smarty_internal_templateparser.php"
- #line 724 "smarty_internal_templateparser.y"
+ #line 2656 "smarty_internal_templateparser.php"
+ #line 725 "smarty_internal_templateparser.y"
function yy_r104()
{
$this->_retvalue = $this->yystack[$this->yyidx + -
5]->minor . ' ? ' . $this->yystack[$this->yyidx + - 2]->minor . ' : ' .
$this->yystack[$this->yyidx + 0]->minor;
}
- #line 2653 "smarty_internal_templateparser.php"
- #line 739 "smarty_internal_templateparser.y"
+ #line 2661 "smarty_internal_templateparser.php"
+ #line 740 "smarty_internal_templateparser.y"
function yy_r107()
{
$this->_retvalue = '!' . $this->yystack[$this->yyidx + 0]->minor;
}
- #line 2658 "smarty_internal_templateparser.php"
- #line 760 "smarty_internal_templateparser.y"
+ #line 2666 "smarty_internal_templateparser.php"
+ #line 761 "smarty_internal_templateparser.y"
function yy_r112()
{
$this->_retvalue = $this->yystack[$this->yyidx + -
2]->minor . '.' . $this->yystack[$this->yyidx + 0]->minor;
}
- #line 2663 "smarty_internal_templateparser.php"
- #line 764 "smarty_internal_templateparser.y"
+ #line 2671 "smarty_internal_templateparser.php"
+ #line 765 "smarty_internal_templateparser.y"
function yy_r113()
{
$this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor . '.';
}
- #line 2668 "smarty_internal_templateparser.php"
- #line 768 "smarty_internal_templateparser.y"
+ #line 2676 "smarty_internal_templateparser.php"
+ #line 769 "smarty_internal_templateparser.y"
function yy_r114()
{
$this->_retvalue = '.' . $this->yystack[$this->yyidx + 0]->minor;
}
- #line 2673 "smarty_internal_templateparser.php"
- #line 773 "smarty_internal_templateparser.y"
+ #line 2681 "smarty_internal_templateparser.php"
+ #line 774 "smarty_internal_templateparser.y"
function yy_r115()
{
if (preg_match('~^true$~i', $this->yystack[$this->yyidx +
0]->minor)) {
@@ -3903,14 +3912,14 @@
$this->_retvalue = "'" . $this->yystack[$this->yyidx +
0]->minor . "'";
}
}
- #line 2686 "smarty_internal_templateparser.php"
- #line 791 "smarty_internal_templateparser.y"
+ #line 2694 "smarty_internal_templateparser.php"
+ #line 792 "smarty_internal_templateparser.y"
function yy_r117()
{
$this->_retvalue = "(" . $this->yystack[$this->yyidx + -
1]->minor . ")";
}
- #line 2691 "smarty_internal_templateparser.php"
- #line 806 "smarty_internal_templateparser.y"
+ #line 2699 "smarty_internal_templateparser.php"
+ #line 807 "smarty_internal_templateparser.y"
function yy_r120()
{
if (!$this->security ||
isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + -
2]->minor]) ||
$this->smarty->security_policy->isTrustedStaticClass($this->yystack[$this->yyidx
+ - 2]->minor, $this->compiler)) {
@@ -3923,8 +3932,8 @@
$this->compiler->trigger_template_error("static class '" .
$this->yystack[$this->yyidx + - 2]->minor . "' is undefined or not allowed
by security setting");
}
}
- #line 2704 "smarty_internal_templateparser.php"
- #line 818 "smarty_internal_templateparser.y"
+ #line 2712 "smarty_internal_templateparser.php"
+ #line 819 "smarty_internal_templateparser.y"
function yy_r121()
{
if ($this->yystack[$this->yyidx + - 2]->minor['var']
== '\'smarty\'') {
@@ -3933,16 +3942,16 @@
$this->_retvalue =
$this->compileVariable($this->yystack[$this->yyidx + - 2]->minor['var']) .
$this->yystack[$this->yyidx + - 2]->minor['smarty_internal_index'] . '::' .
$this->yystack[$this->yyidx + 0]->minor;
}
}
- #line 2713 "smarty_internal_templateparser.php"
- #line 827 "smarty_internal_templateparser.y"
+ #line 2721 "smarty_internal_templateparser.php"
+ #line 828 "smarty_internal_templateparser.y"
function yy_r122()
{
self::$prefix_number ++;
$this->compiler->prefix_code[] = '<?php ob_start();?>' .
$this->yystack[$this->yyidx + - 1]->minor . '<?php $_tmp' .
self::$prefix_number . '=ob_get_clean();?>';
$this->_retvalue = '$_tmp' . self::$prefix_number;
}
- #line 2720 "smarty_internal_templateparser.php"
- #line 842 "smarty_internal_templateparser.y"
+ #line 2728 "smarty_internal_templateparser.php"
+ #line 843 "smarty_internal_templateparser.y"
function yy_r124()
{
if ($this->yystack[$this->yyidx + 0]->minor['var']
== '\'smarty\'') {
@@ -3955,116 +3964,116 @@
$this->_retvalue =
$this->compileVariable($this->yystack[$this->yyidx + 0]->minor['var']) .
$this->yystack[$this->yyidx + 0]->minor['smarty_internal_index'];
}
}
- #line 2733 "smarty_internal_templateparser.php"
- #line 855 "smarty_internal_templateparser.y"
+ #line 2741 "smarty_internal_templateparser.php"
+ #line 856 "smarty_internal_templateparser.y"
function yy_r125()
{
$this->_retvalue = '$_smarty_tpl->tpl_vars[' .
$this->yystack[$this->yyidx + - 2]->minor . ']->' .
$this->yystack[$this->yyidx + 0]->minor;
}
- #line 2738 "smarty_internal_templateparser.php"
- #line 865 "smarty_internal_templateparser.y"
+ #line 2746 "smarty_internal_templateparser.php"
+ #line 866 "smarty_internal_templateparser.y"
function yy_r127()
{
$this->_retvalue = '$_smarty_tpl->getConfigVariable(\'' .
$this->yystack[$this->yyidx + - 1]->minor . '\')';
}
- #line 2743 "smarty_internal_templateparser.php"
- #line 869 "smarty_internal_templateparser.y"
+ #line 2751 "smarty_internal_templateparser.php"
+ #line 870 "smarty_internal_templateparser.y"
function yy_r128()
{
$this->_retvalue = '(is_array($tmp =
$_smarty_tpl->getConfigVariable(\'' . $this->yystack[$this->yyidx + -
2]->minor . '\')) ? $tmp' . $this->yystack[$this->yyidx +
0]->minor . ' :null)';
}
- #line 2748 "smarty_internal_templateparser.php"
- #line 873 "smarty_internal_templateparser.y"
+ #line 2756 "smarty_internal_templateparser.php"
+ #line 874 "smarty_internal_templateparser.y"
function yy_r129()
{
$this->_retvalue = '$_smarty_tpl->getConfigVariable(' .
$this->yystack[$this->yyidx + - 1]->minor . ')';
}
- #line 2753 "smarty_internal_templateparser.php"
- #line 877 "smarty_internal_templateparser.y"
+ #line 2761 "smarty_internal_templateparser.php"
+ #line 878 "smarty_internal_templateparser.y"
function yy_r130()
{
$this->_retvalue = '(is_array($tmp =
$_smarty_tpl->getConfigVariable(' . $this->yystack[$this->yyidx + -
2]->minor . ')) ? $tmp' . $this->yystack[$this->yyidx + 0]->minor . ' :
null)';
}
- #line 2758 "smarty_internal_templateparser.php"
- #line 881 "smarty_internal_templateparser.y"
+ #line 2766 "smarty_internal_templateparser.php"
+ #line 882 "smarty_internal_templateparser.y"
function yy_r131()
{
$this->_retvalue = array('var' => $this->yystack[$this->yyidx + -
1]->minor, 'smarty_internal_index' => $this->yystack[$this->yyidx +
0]->minor);
}
- #line 2763 "smarty_internal_templateparser.php"
- #line 894 "smarty_internal_templateparser.y"
+ #line 2771 "smarty_internal_templateparser.php"
+ #line 895 "smarty_internal_templateparser.y"
function yy_r133()
{
return;
}
- #line 2768 "smarty_internal_templateparser.php"
- #line 900 "smarty_internal_templateparser.y"
+ #line 2776 "smarty_internal_templateparser.php"
+ #line 901 "smarty_internal_templateparser.y"
function yy_r134()
{
$this->_retvalue = '[' .
$this->compileVariable($this->yystack[$this->yyidx + 0]->minor) . ']';
}
- #line 2773 "smarty_internal_templateparser.php"
- #line 904 "smarty_internal_templateparser.y"
+ #line 2781 "smarty_internal_templateparser.php"
+ #line 905 "smarty_internal_templateparser.y"
function yy_r135()
{
$this->_retvalue = '[' .
$this->compileVariable($this->yystack[$this->yyidx + - 2]->minor) . '->' .
$this->yystack[$this->yyidx + 0]->minor . ']';
}
- #line 2778 "smarty_internal_templateparser.php"
- #line 908 "smarty_internal_templateparser.y"
+ #line 2786 "smarty_internal_templateparser.php"
+ #line 909 "smarty_internal_templateparser.y"
function yy_r136()
{
$this->_retvalue = "['" . $this->yystack[$this->yyidx +
0]->minor . "']";
}
- #line 2783 "smarty_internal_templateparser.php"
- #line 912 "smarty_internal_templateparser.y"
+ #line 2791 "smarty_internal_templateparser.php"
+ #line 913 "smarty_internal_templateparser.y"
function yy_r137()
{
$this->_retvalue = "[" . $this->yystack[$this->yyidx +
0]->minor . "]";
}
- #line 2788 "smarty_internal_templateparser.php"
- #line 916 "smarty_internal_templateparser.y"
+ #line 2796 "smarty_internal_templateparser.php"
+ #line 917 "smarty_internal_templateparser.y"
function yy_r138()
{
$this->_retvalue = "[" . $this->yystack[$this->yyidx + -
1]->minor . "]";
}
- #line 2793 "smarty_internal_templateparser.php"
- #line 921 "smarty_internal_templateparser.y"
+ #line 2801 "smarty_internal_templateparser.php"
+ #line 922 "smarty_internal_templateparser.y"
function yy_r139()
{
$this->_retvalue = '[' .
$this->compiler->compileTag('private_special_variable',
array(), '[\'section\'][\'' . $this->yystack[$this->yyidx + -
1]->minor . '\'][\'index\']') . ']';
}
- #line 2798 "smarty_internal_templateparser.php"
- #line 925 "smarty_internal_templateparser.y"
+ #line 2806 "smarty_internal_templateparser.php"
+ #line 926 "smarty_internal_templateparser.y"
function yy_r140()
{
$this->_retvalue = '[' .
$this->compiler->compileTag('private_special_variable',
array(), '[\'section\'][\'' . $this->yystack[$this->yyidx + -
3]->minor . '\'][\'' . $this->yystack[$this->yyidx + -
1]->minor . '\']') . ']';
}
- #line 2803 "smarty_internal_templateparser.php"
- #line 935 "smarty_internal_templateparser.y"
+ #line 2811 "smarty_internal_templateparser.php"
+ #line 936 "smarty_internal_templateparser.y"
function yy_r142()
{
$this->_retvalue = '[]';
}
- #line 2808 "smarty_internal_templateparser.php"
- #line 948 "smarty_internal_templateparser.y"
+ #line 2816 "smarty_internal_templateparser.php"
+ #line 949 "smarty_internal_templateparser.y"
function yy_r144()
{
$this->_retvalue = $this->yystack[$this->yyidx + -
1]->minor . '.' . $this->yystack[$this->yyidx + 0]->minor;
}
- #line 2813 "smarty_internal_templateparser.php"
- #line 953 "smarty_internal_templateparser.y"
+ #line 2821 "smarty_internal_templateparser.php"
+ #line 954 "smarty_internal_templateparser.y"
function yy_r145()
{
$this->_retvalue = '\'' . $this->yystack[$this->yyidx +
0]->minor . '\'';
}
- #line 2818 "smarty_internal_templateparser.php"
- #line 958 "smarty_internal_templateparser.y"
+ #line 2826 "smarty_internal_templateparser.php"
+ #line 959 "smarty_internal_templateparser.y"
function yy_r146()
{
$this->_retvalue = '(' . $this->yystack[$this->yyidx + -
1]->minor . ')';
}
- #line 2823 "smarty_internal_templateparser.php"
- #line 965 "smarty_internal_templateparser.y"
+ #line 2831 "smarty_internal_templateparser.php"
+ #line 966 "smarty_internal_templateparser.y"
function yy_r147()
{
if ($this->yystack[$this->yyidx + - 1]->minor['var']
== '\'smarty\'') {
@@ -4073,20 +4082,20 @@
$this->_retvalue =
$this->compileVariable($this->yystack[$this->yyidx + - 1]->minor['var']) .
$this->yystack[$this->yyidx + - 1]->minor['smarty_internal_index'] .
$this->yystack[$this->yyidx + 0]->minor;
}
}
- #line 2832 "smarty_internal_templateparser.php"
- #line 974 "smarty_internal_templateparser.y"
+ #line 2840 "smarty_internal_templateparser.php"
+ #line 975 "smarty_internal_templateparser.y"
function yy_r148()
{
$this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;
}
- #line 2837 "smarty_internal_templateparser.php"
- #line 979 "smarty_internal_templateparser.y"
+ #line 2845 "smarty_internal_templateparser.php"
+ #line 980 "smarty_internal_templateparser.y"
function yy_r149()
{
$this->_retvalue = $this->yystack[$this->yyidx + - 1]->minor .
$this->yystack[$this->yyidx + 0]->minor;
}
- #line 2842 "smarty_internal_templateparser.php"
- #line 984 "smarty_internal_templateparser.y"
+ #line 2850 "smarty_internal_templateparser.php"
+ #line 985 "smarty_internal_templateparser.y"
function yy_r150()
{
if ($this->security && substr($this->yystack[$this->yyidx + -
1]->minor, 0, 1) == '_') {
@@ -4094,8 +4103,8 @@
}
$this->_retvalue = '->' . $this->yystack[$this->yyidx + -
1]->minor . $this->yystack[$this->yyidx + 0]->minor;
}
- #line 2850 "smarty_internal_templateparser.php"
- #line 991 "smarty_internal_templateparser.y"
+ #line 2858 "smarty_internal_templateparser.php"
+ #line 992 "smarty_internal_templateparser.y"
function yy_r151()
{
if ($this->security) {
@@ -4103,8 +4112,8 @@
}
$this->_retvalue = '->{' .
$this->compileVariable($this->yystack[$this->yyidx + - 1]->minor) .
$this->yystack[$this->yyidx + 0]->minor . '}';
}
- #line 2858 "smarty_internal_templateparser.php"
- #line 998 "smarty_internal_templateparser.y"
+ #line 2866 "smarty_internal_templateparser.php"
+ #line 999 "smarty_internal_templateparser.y"
function yy_r152()
{
if ($this->security) {
@@ -4112,8 +4121,8 @@
}
$this->_retvalue = '->{' . $this->yystack[$this->yyidx + -
2]->minor . $this->yystack[$this->yyidx + 0]->minor . '}';
}
- #line 2866 "smarty_internal_templateparser.php"
- #line 1005 "smarty_internal_templateparser.y"
+ #line 2874 "smarty_internal_templateparser.php"
+ #line 1006 "smarty_internal_templateparser.y"
function yy_r153()
{
if ($this->security) {
@@ -4121,14 +4130,14 @@
}
$this->_retvalue = '->{\'' . $this->yystack[$this->yyidx + -
4]->minor . '\'.' . $this->yystack[$this->yyidx + - 2]->minor .
$this->yystack[$this->yyidx + 0]->minor . '}';
}
- #line 2874 "smarty_internal_templateparser.php"
- #line 1013 "smarty_internal_templateparser.y"
+ #line 2882 "smarty_internal_templateparser.php"
+ #line 1014 "smarty_internal_templateparser.y"
***The diff for this file has been truncated for email.***
Reply all
Reply to author
Forward
0 new messages