diff options
author | emkael <emkael@tlen.pl> | 2018-10-18 02:40:38 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2018-10-18 02:40:38 +0200 |
commit | eab8a101e7a3fcbb41e01a574985e06c5a3775de (patch) | |
tree | 60f201da5984b0c3638d10da02bba42b61aa3177 /lib/smarty3/sysplugins/smarty_internal_runtime_make_nocache.php | |
parent | 7f38be342c1495aeca418286c15c25c18ac9e142 (diff) |
Updating Smarty
Diffstat (limited to 'lib/smarty3/sysplugins/smarty_internal_runtime_make_nocache.php')
-rw-r--r-- | lib/smarty3/sysplugins/smarty_internal_runtime_make_nocache.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/smarty3/sysplugins/smarty_internal_runtime_make_nocache.php b/lib/smarty3/sysplugins/smarty_internal_runtime_make_nocache.php index dd9e15f..5306914 100644 --- a/lib/smarty3/sysplugins/smarty_internal_runtime_make_nocache.php +++ b/lib/smarty3/sysplugins/smarty_internal_runtime_make_nocache.php @@ -6,11 +6,9 @@ * @package Smarty * @subpackage PluginsInternal * @author Uwe Tews - * */ class Smarty_Internal_Runtime_Make_Nocache { - /** * Save current variable value while rendering compiled template and inject nocache code to * assign variable value in cahed template @@ -23,14 +21,14 @@ class Smarty_Internal_Runtime_Make_Nocache public function save(Smarty_Internal_Template $tpl, $var) { if (isset($tpl->tpl_vars[ $var ])) { - $export = preg_replace('/^Smarty_Variable::__set_state[(]|\s|[)]$/', '', - var_export($tpl->tpl_vars[ $var ], true)); + $export = + preg_replace('/^Smarty_Variable::__set_state[(]|[)]$/', '', var_export($tpl->tpl_vars[ $var ], true)); if (preg_match('/(\w+)::__set_state/', $export, $match)) { throw new SmartyException("{make_nocache \${$var}} in template '{$tpl->source->name}': variable does contain object '{$match[1]}' not implementing method '__set_state'"); } echo "/*%%SmartyNocache:{$tpl->compiled->nocache_hash}%%*/<?php " . - addcslashes("\$_smarty_tpl->smarty->ext->_make_nocache->store(\$_smarty_tpl, '{$var}', " . $export, - '\\') . ");?>\n/*/%%SmartyNocache:{$tpl->compiled->nocache_hash}%%*/"; + addcslashes("\$_smarty_tpl->smarty->ext->_make_nocache->store(\$_smarty_tpl, '{$var}', ", '\\') . + $export . ");?>\n/*/%%SmartyNocache:{$tpl->compiled->nocache_hash}%%*/"; } } @@ -38,8 +36,8 @@ class Smarty_Internal_Runtime_Make_Nocache * Store variable value saved while rendering compiled template in cached template context * * @param \Smarty_Internal_Template $tpl - * @param string $var variable name - * @param array $properties + * @param string $var variable name + * @param array $properties */ public function store(Smarty_Internal_Template $tpl, $var, $properties) { |