- bugfix template caching did not care about file.tpl in different template_dir

- bugfix {include $file} was broken when merge_compiled_incluges = true
- bugfix {include} was broken when merge_compiled_incluges = true and same indluded template
  was used in different main templates in one compilation run
This commit is contained in:
uwe.tews@googlemail.com
2011-09-18 02:31:58 +00:00
parent c9be9cd7f9
commit a44d9a6ac9
8 changed files with 28 additions and 19 deletions
@@ -154,10 +154,10 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource {
if ($tpl->source->exists) {
$_resourcename_parts = basename(str_replace('^', '/', $tpl->cached->filepath));
// remove from template cache
unset($smarty->template_objects[sha1($tpl->template_resource . $tpl->cache_id . $tpl->compile_id)]);
unset($smarty->template_objects[sha1(join(DIRECTORY_SEPARATOR, $smarty->getTemplateDir()).$tpl->template_resource . $tpl->cache_id . $tpl->compile_id)]);
} else {
// remove from template cache
unset($smarty->template_objects[sha1($tpl->template_resource . $tpl->cache_id . $tpl->compile_id)]);
unset($smarty->template_objects[sha1(join(DIRECTORY_SEPARATOR, $smarty->getTemplateDir()).$tpl->template_resource . $tpl->cache_id . $tpl->compile_id)]);
return 0;
}
}