mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
- bugfix variable resource name at custom resource plugin did not work within {block} tags (Issue 163)
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
===== trunk =====
|
===== trunk =====
|
||||||
|
28.10.2013
|
||||||
|
- bugfix variable resource name at custom resource plugin did not work within {block} tags (Issue 163)
|
||||||
|
|
||||||
20.10.2013
|
20.10.2013
|
||||||
- bugfix a variable file name at {extends} tag did fail (forum topic 24618)
|
- bugfix a variable file name at {extends} tag did fail (forum topic 24618)
|
||||||
|
|
||||||
|
@@ -85,7 +85,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
|
|||||||
$_caching = Smarty::CACHING_OFF;
|
$_caching = Smarty::CACHING_OFF;
|
||||||
|
|
||||||
// flag if included template code should be merged into caller
|
// flag if included template code should be merged into caller
|
||||||
$merge_compiled_includes = ($compiler->smarty->merge_compiled_includes || $_attr['inline'] === true) && !$compiler->template->source->recompiled;
|
$merge_compiled_includes = ($compiler->smarty->merge_compiled_includes || $compiler->inheritance || $_attr['inline'] === true) && !$compiler->template->source->recompiled;
|
||||||
|
|
||||||
// set default when in nocache mode
|
// set default when in nocache mode
|
||||||
// if ($compiler->template->caching && ($compiler->nocache || $compiler->tag_nocache || $compiler->forceNocache == 2)) {
|
// if ($compiler->template->caching && ($compiler->nocache || $compiler->tag_nocache || $compiler->forceNocache == 2)) {
|
||||||
@@ -121,7 +121,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
|
|||||||
}
|
}
|
||||||
if ($_attr['nocache'] === true) {
|
if ($_attr['nocache'] === true) {
|
||||||
$compiler->tag_nocache = true;
|
$compiler->tag_nocache = true;
|
||||||
if ($merge_compiled_includes || $compiler->inheritance) {
|
if ($merge_compiled_includes) {
|
||||||
$_caching = self::CACHING_NOCACHE_CODE;
|
$_caching = self::CACHING_NOCACHE_CODE;
|
||||||
} else {
|
} else {
|
||||||
$_caching = Smarty::CACHING_OFF;
|
$_caching = Smarty::CACHING_OFF;
|
||||||
@@ -129,7 +129,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
$has_compiled_template = false;
|
$has_compiled_template = false;
|
||||||
if ($merge_compiled_includes || $compiler->inheritance) {
|
if ($merge_compiled_includes) {
|
||||||
// variable template name ?
|
// variable template name ?
|
||||||
if ($compiler->has_variable_string || !((substr_count($include_file, '"') == 2 || substr_count($include_file, "'") == 2))
|
if ($compiler->has_variable_string || !((substr_count($include_file, '"') == 2 || substr_count($include_file, "'") == 2))
|
||||||
|| substr_count($include_file, '(') != 0 || substr_count($include_file, '$_smarty_tpl->') != 0
|
|| substr_count($include_file, '(') != 0 || substr_count($include_file, '$_smarty_tpl->') != 0
|
||||||
@@ -151,7 +151,7 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($merge_compiled_includes || $compiler->inheritance) {
|
if ($merge_compiled_includes) {
|
||||||
// we must observe different compile_id
|
// we must observe different compile_id
|
||||||
$uid = sha1($_compile_id);
|
$uid = sha1($_compile_id);
|
||||||
$tpl_name = null;
|
$tpl_name = null;
|
||||||
|
Reference in New Issue
Block a user