mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-03 05:41:37 +01:00
- bugfix repeated calls to same subtemplate did not make use of cached template object
This commit is contained in:
@@ -240,7 +240,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase {
|
||||
public function getSubTemplate($template, $cache_id, $compile_id, $caching, $cache_lifetime, $data, $parent_scope)
|
||||
{
|
||||
// already in template cache?
|
||||
$_templateId = sha1($template . $cache_id . $compile_id);
|
||||
$_templateId = sha1(join(DIRECTORY_SEPARATOR, $this->smarty->getTemplateDir()).$template . $cache_id . $compile_id);
|
||||
if (isset($this->smarty->template_objects[$_templateId])) {
|
||||
// clone cached template object because of possible recursive call
|
||||
$tpl = clone $this->smarty->template_objects[$_templateId];
|
||||
|
||||
Reference in New Issue
Block a user