mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-10 05:14:26 +02:00
- fixed merging of recursive includes
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
10/24/2009
|
10/24/2009
|
||||||
- fixed nocache vars at internal block tags
|
- fixed nocache vars at internal block tags
|
||||||
|
- fixed merging of recursive includes
|
||||||
|
|
||||||
10/23/2009
|
10/23/2009
|
||||||
- fixed nocache var problem
|
- fixed nocache var problem
|
||||||
|
@@ -34,6 +34,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase {
|
|||||||
// check if compiled code can be merged (contains no variable part)
|
// check if compiled code can be merged (contains no variable part)
|
||||||
if (!$compiler->has_variable_string && (substr_count($include_file, '"') == 2 or substr_count($include_file, "'") == 2) and substr_count($include_file, '(') == 0) {
|
if (!$compiler->has_variable_string && (substr_count($include_file, '"') == 2 or substr_count($include_file, "'") == 2) and substr_count($include_file, '(') == 0) {
|
||||||
eval("\$tmp = $include_file;");
|
eval("\$tmp = $include_file;");
|
||||||
|
if ($this->compiler->template->template_resource != $tmp) {
|
||||||
$tpl = $compiler->smarty->createTemplate ($tmp, $compiler->template->cache_id, $compiler->template->compile_id, $compiler->template);
|
$tpl = $compiler->smarty->createTemplate ($tmp, $compiler->template->cache_id, $compiler->template->compile_id, $compiler->template);
|
||||||
if ($tpl->isExisting()) {
|
if ($tpl->isExisting()) {
|
||||||
do {
|
do {
|
||||||
@@ -70,6 +71,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($_attr['assign'])) {
|
if (isset($_attr['assign'])) {
|
||||||
// output will be stored in a smarty variable instead of beind displayed
|
// output will be stored in a smarty variable instead of beind displayed
|
||||||
|
Reference in New Issue
Block a user