mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-07 03:44:26 +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
|
05/05/2010
|
||||||
- bugfix on {insert} to cache parameter
|
- bugfix on {insert} to cache parameter
|
||||||
- implementation of $smarty->default_modifiers as in Smarty2
|
- 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()) {
|
if ($tpl->resource_object->usesCompiler && $tpl->isExisting()) {
|
||||||
// make sure that template is up to date and merge template properties
|
// 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
|
// compiled code for {function} tags
|
||||||
$compiler->template->properties['function'] = array_merge($compiler->template->properties['function'], $tpl->properties['function']);
|
$compiler->template->properties['function'] = array_merge($compiler->template->properties['function'], $tpl->properties['function']);
|
||||||
// get compiled code
|
// get compiled code
|
||||||
$compiled_tpl = $tpl->getCompiledTemplate();
|
// $compiled_tpl = $tpl->getCompiledTemplate(); // 06/05/2010
|
||||||
// remove header code
|
// remove header code
|
||||||
$compiled_tpl = preg_replace("/(<\?php \/\*%%SmartyHeaderCode:{$tpl->properties['nocache_hash']}%%\*\/(.+?)\/\*\/%%SmartyHeaderCode%%\*\/\?>\n)/s", '', $compiled_tpl);
|
$compiled_tpl = preg_replace("/(<\?php \/\*%%SmartyHeaderCode:{$tpl->properties['nocache_hash']}%%\*\/(.+?)\/\*\/%%SmartyHeaderCode%%\*\/\?>\n)/s", '', $compiled_tpl);
|
||||||
if ($tpl->has_nocache_code) {
|
if ($tpl->has_nocache_code) {
|
||||||
|
Reference in New Issue
Block a user