mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 03:14:27 +02:00
- bugfix when merging compiled templates and objects are passed as parameter of the {include} tag
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
06/05/2010
|
||||
- bugfix when merging compiled templates and objects are passed as parameter of the {include} tag
|
||||
|
||||
05/05/2010
|
||||
- bugfix on {insert} to cache parameter
|
||||
- implementation of $smarty->default_modifiers as in Smarty2
|
||||
|
@@ -42,11 +42,12 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase {
|
||||
}
|
||||
if ($tpl->resource_object->usesCompiler && $tpl->isExisting()) {
|
||||
// make sure that template is up to date and merge template properties
|
||||
$tpl->renderTemplate();
|
||||
// $tpl->renderTemplate(); // 06/05/2010
|
||||
$compiled_tpl = $tpl->getCompiledTemplate(); // 06/05/2010
|
||||
// compiled code for {function} tags
|
||||
$compiler->template->properties['function'] = array_merge($compiler->template->properties['function'], $tpl->properties['function']);
|
||||
// get compiled code
|
||||
$compiled_tpl = $tpl->getCompiledTemplate();
|
||||
// $compiled_tpl = $tpl->getCompiledTemplate(); // 06/05/2010
|
||||
// remove header code
|
||||
$compiled_tpl = preg_replace("/(<\?php \/\*%%SmartyHeaderCode:{$tpl->properties['nocache_hash']}%%\*\/(.+?)\/\*\/%%SmartyHeaderCode%%\*\/\?>\n)/s", '', $compiled_tpl);
|
||||
if ($tpl->has_nocache_code) {
|
||||
@@ -142,4 +143,4 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase {
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
Reference in New Issue
Block a user