diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-04-23 21:24:22 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-04-23 21:24:22 +0200 |
commit | 7e30c1dd823686eb8e59e6e1c171a751e8af2d49 (patch) | |
tree | 9a0dee0a26572e21f5576bcddbc2c4d4b905aa23 /library/Smarty/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php | |
parent | 78bf4564f20df20ec8d9025c974e25546e95bf69 (diff) | |
download | volse-hubzilla-7e30c1dd823686eb8e59e6e1c171a751e8af2d49.tar.gz volse-hubzilla-7e30c1dd823686eb8e59e6e1c171a751e8af2d49.tar.bz2 volse-hubzilla-7e30c1dd823686eb8e59e6e1c171a751e8af2d49.zip |
update smarty to version 3.1.29
Diffstat (limited to 'library/Smarty/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php')
-rw-r--r-- | library/Smarty/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php b/library/Smarty/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php index ae1003238..cce8553f5 100644 --- a/library/Smarty/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php +++ b/library/Smarty/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php @@ -107,13 +107,6 @@ class Smarty_Internal_Method_ClearCompiledTemplate } if ($unlink && @unlink($_filepath)) { - if (isset($smarty->_cache['template_objects'])) { - foreach ($smarty->_cache['template_objects'] as $key => $tpl) { - if (isset($tpl->compiled) && $tpl->compiled->filepath == $_filepath) { - unset($smarty->_cache['template_objects'][$key]); - } - } - } $_count ++; if (function_exists('opcache_invalidate')) { opcache_invalidate($_filepath); @@ -121,11 +114,10 @@ class Smarty_Internal_Method_ClearCompiledTemplate } } } - // clear compiled cache - if (!isset($resource_name) && isset($smarty->_cache['source_objects'])) { - foreach ($smarty->_cache['source_objects'] as $source) { - $source->compileds = array(); - } + // clear template objects cache + $smarty->_cache['isCached'] = array(); + if (isset($smarty->ext->_subtemplate)) { + $smarty->ext->_subtemplate->tplObjects = array(); } return $_count; } |