aboutsummaryrefslogtreecommitdiffstats
path: root/include/smarty/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2016-01-21 15:10:02 +0100
committerplegall <plg@piwigo.org>2016-01-21 15:10:02 +0100
commitd33051cb7236a930c1baf879fee75e92c35a93ee (patch)
tree4f7c596268420cc670cbbf767d941fadb07a1b26 /include/smarty/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php
parent491464355911334ecbf49b742545286e82961112 (diff)
update to Smarty 3.1.29
Diffstat (limited to 'include/smarty/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php')
-rw-r--r--include/smarty/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php16
1 files changed, 4 insertions, 12 deletions
diff --git a/include/smarty/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php b/include/smarty/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php
index ae1003238..cce8553f5 100644
--- a/include/smarty/libs/sysplugins/smarty_internal_method_clearcompiledtemplate.php
+++ b/include/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;
}