mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 02:44:27 +02:00
- bugfix <?xml ... ?> including template variables broken since 3.1.22 https://github.com/smarty-php/smarty/issues/47
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
===== 3.1.25-dev===== (xx.xx.2015)
|
===== 3.1.25-dev===== (xx.xx.2015)
|
||||||
|
01.06.2105
|
||||||
|
- bugfix <?xml ... ?> including template variables broken since 3.1.22 https://github.com/smarty-php/smarty/issues/47
|
||||||
|
|
||||||
27.05.2015
|
27.05.2015
|
||||||
- bugfix {include} with variable file name must not create by default individual cache file (since 3.1.22) https://github.com/smarty-php/smarty/issues/43
|
- bugfix {include} with variable file name must not create by default individual cache file (since 3.1.22) https://github.com/smarty-php/smarty/issues/43
|
||||||
|
|
||||||
|
@@ -128,9 +128,15 @@ class Smarty_Internal_Templatelexer
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public $yyTracePrompt;
|
public $yyTracePrompt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* XML flag true while processing xml
|
||||||
|
*
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
public $is_xml = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* state names
|
* state names
|
||||||
*
|
*
|
||||||
|
@@ -252,6 +252,13 @@ template_element(res)::= PHP(o). {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// nocache code
|
||||||
|
template_element(res)::= NOCACHE(c). {
|
||||||
|
$this->compiler->tag_nocache = true;
|
||||||
|
$save = $this->template->has_nocache_code;
|
||||||
|
res = new Smarty_Internal_ParseTree_Tag($this, $this->compiler->processNocacheCode("<?php echo '{c}';?>\n", $this->compiler, true));
|
||||||
|
$this->template->has_nocache_code = $save;
|
||||||
|
}
|
||||||
// template text
|
// template text
|
||||||
template_element(res)::= text_content(t). {
|
template_element(res)::= text_content(t). {
|
||||||
res = $this->compiler->processText(t);
|
res = $this->compiler->processText(t);
|
||||||
|
@@ -111,7 +111,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
|||||||
/**
|
/**
|
||||||
* smarty version
|
* smarty version
|
||||||
*/
|
*/
|
||||||
const SMARTY_VERSION = '3.1.25-dev/2';
|
const SMARTY_VERSION = '3.1.25-dev/3';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* define variable scopes
|
* define variable scopes
|
||||||
|
@@ -106,7 +106,9 @@ class Smarty_Internal_Compile_Private_Php extends Smarty_Internal_CompileBase
|
|||||||
$lex->taglineno = $lex->line;
|
$lex->taglineno = $lex->line;
|
||||||
$closeTag = '?>';
|
$closeTag = '?>';
|
||||||
if (strpos($lex->value, '<?xml') === 0) {
|
if (strpos($lex->value, '<?xml') === 0) {
|
||||||
$lex->phpType = 'xml';
|
$lex->is_xml = true;
|
||||||
|
$lex->token = Smarty_Internal_Templateparser::TP_NOCACHE;
|
||||||
|
return;
|
||||||
} elseif (strpos($lex->value, '<?') === 0) {
|
} elseif (strpos($lex->value, '<?') === 0) {
|
||||||
$lex->phpType = 'php';
|
$lex->phpType = 'php';
|
||||||
} elseif (strpos($lex->value, '<%') === 0) {
|
} elseif (strpos($lex->value, '<%') === 0) {
|
||||||
@@ -115,6 +117,11 @@ class Smarty_Internal_Compile_Private_Php extends Smarty_Internal_CompileBase
|
|||||||
} elseif (strpos($lex->value, '%>') === 0) {
|
} elseif (strpos($lex->value, '%>') === 0) {
|
||||||
$lex->phpType = 'unmatched';
|
$lex->phpType = 'unmatched';
|
||||||
} elseif (strpos($lex->value, '?>') === 0) {
|
} elseif (strpos($lex->value, '?>') === 0) {
|
||||||
|
if ($lex->is_xml) {
|
||||||
|
$lex->is_xml = false;
|
||||||
|
$lex->token = Smarty_Internal_Templateparser::TP_NOCACHE;
|
||||||
|
return;
|
||||||
|
}
|
||||||
$lex->phpType = 'unmatched';
|
$lex->phpType = 'unmatched';
|
||||||
} elseif (strpos($lex->value, '<s') === 0) {
|
} elseif (strpos($lex->value, '<s') === 0) {
|
||||||
$lex->phpType = 'script';
|
$lex->phpType = 'script';
|
||||||
|
@@ -19,7 +19,6 @@
|
|||||||
*/
|
*/
|
||||||
class Smarty_Internal_Templatelexer
|
class Smarty_Internal_Templatelexer
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Source
|
* Source
|
||||||
*
|
*
|
||||||
@@ -143,9 +142,15 @@ class Smarty_Internal_Templatelexer
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public $yyTracePrompt;
|
public $yyTracePrompt;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* XML flag true while processing xml
|
||||||
|
*
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
public $is_xml = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* state names
|
* state names
|
||||||
*
|
*
|
||||||
@@ -1318,6 +1323,7 @@ class Smarty_Internal_Templatelexer
|
|||||||
$this->value = substr($this->data, $this->counter, $to - $this->counter);
|
$this->value = substr($this->data, $this->counter, $to - $this->counter);
|
||||||
$this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE;
|
$this->token = Smarty_Internal_Templateparser::TP_BLOCKSOURCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user