mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-03 18:04:26 +02:00
fix compilation for caching templates (#801)
This commit is contained in:
@@ -292,7 +292,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
|
|||||||
$smarty = &$this->smarty;
|
$smarty = &$this->smarty;
|
||||||
$_templateId = $smarty->_getTemplateId($template, $cache_id, $compile_id, $caching, $tpl);
|
$_templateId = $smarty->_getTemplateId($template, $cache_id, $compile_id, $caching, $tpl);
|
||||||
// recursive call ?
|
// recursive call ?
|
||||||
if (isset($tpl->templateId) ? $tpl->templateId : $tpl->_getTemplateId() !== $_templateId) {
|
if ((isset($tpl->templateId) ? $tpl->templateId : $tpl->_getTemplateId()) !== $_templateId) {
|
||||||
// already in template cache?
|
// already in template cache?
|
||||||
if (isset(self::$tplObjCache[ $_templateId ])) {
|
if (isset(self::$tplObjCache[ $_templateId ])) {
|
||||||
// copy data from cached object
|
// copy data from cached object
|
||||||
@@ -358,7 +358,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase
|
|||||||
}
|
}
|
||||||
if ($tpl->caching === 9999) {
|
if ($tpl->caching === 9999) {
|
||||||
if (!isset($tpl->compiled)) {
|
if (!isset($tpl->compiled)) {
|
||||||
$this->loadCompiled(true);
|
$tpl->loadCompiled(true);
|
||||||
}
|
}
|
||||||
if ($tpl->compiled->has_nocache_code) {
|
if ($tpl->compiled->has_nocache_code) {
|
||||||
$this->cached->hashes[ $tpl->compiled->nocache_hash ] = true;
|
$this->cached->hashes[ $tpl->compiled->nocache_hash ] = true;
|
||||||
|
Reference in New Issue
Block a user