diff --git a/change_log.txt b/change_log.txt index 22966a56..1e0c7745 100644 --- a/change_log.txt +++ b/change_log.txt @@ -2,6 +2,7 @@ 27.12.2015 - improve inheritance code - update external methods + - code fixes 25.12.2015 - compile {block} tag code and its processing into classes diff --git a/libs/sysplugins/smarty_internal_compile_include.php b/libs/sysplugins/smarty_internal_compile_include.php index 7f247a6d..53971a82 100644 --- a/libs/sysplugins/smarty_internal_compile_include.php +++ b/libs/sysplugins/smarty_internal_compile_include.php @@ -325,8 +325,8 @@ class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase $compiler->template->cache_id, $c_id, $_caching); if (!($tpl->source->handler->uncompiled) && $tpl->source->exists) { $compiler->parent_compiler->mergedSubTemplatesData[$hashResourceName][$t_hash]['uid'] = $tpl->source->uid; - if (isset($compiler->template->_inheritance)) { - $tpl->_inheritance = clone $compiler->template->_inheritance; + if (isset($compiler->template->ext->_inheritance)) { + $tpl->ext->_inheritance = clone $compiler->template->ext->_inheritance; } $tpl->compiled = new Smarty_Template_Compiled(); $tpl->compiled->nocache_hash = $compiler->parent_compiler->template->compiled->nocache_hash; diff --git a/libs/sysplugins/smarty_internal_compile_insert.php b/libs/sysplugins/smarty_internal_compile_insert.php index 2ebde166..5c753ffa 100644 --- a/libs/sysplugins/smarty_internal_compile_insert.php +++ b/libs/sysplugins/smarty_internal_compile_insert.php @@ -90,7 +90,7 @@ class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase if (isset($compiler->smarty->security_policy)) { $_dir = $compiler->smarty->security_policy->trusted_dir; } else { - $_dir = $compiler->smarty->trusted_dir; + $_dir = $compiler->smarty instanceof SmartyBC ? $compiler->smarty->trusted_dir : null; } if (!empty($_dir)) { foreach ((array) $_dir as $_script_dir) { diff --git a/libs/sysplugins/smarty_internal_compile_private_foreachsection.php b/libs/sysplugins/smarty_internal_compile_private_foreachsection.php index 16f23335..4c5dfd8f 100644 --- a/libs/sysplugins/smarty_internal_compile_private_foreachsection.php +++ b/libs/sysplugins/smarty_internal_compile_private_foreachsection.php @@ -175,7 +175,7 @@ class Smarty_Internal_Compile_Private_ForeachSection extends Smarty_Internal_Com // run pre filter if required if ((isset($nextCompiler->smarty->autoload_filters['pre']) || isset($nextCompiler->smarty->registered_filters['pre']))) { - $_content = $nextCompiler->smarty->ext->_filter_Handler->runFilter('pre', $_content, $nextCompiler->template); + $_content = $nextCompiler->smarty->ext->_filterHandler->runFilter('pre', $_content, $nextCompiler->template); } $this->matchProperty($_content); } diff --git a/libs/sysplugins/smarty_internal_compile_private_php.php b/libs/sysplugins/smarty_internal_compile_private_php.php index 3ca63a54..14036f1c 100644 --- a/libs/sysplugins/smarty_internal_compile_private_php.php +++ b/libs/sysplugins/smarty_internal_compile_private_php.php @@ -46,7 +46,7 @@ class Smarty_Internal_Compile_Private_Php extends Smarty_Internal_CompileBase $output = addcslashes($_attr['code'], "'\\"); $compiler->parser->current_buffer->append_subtree($compiler->parser, new Smarty_Internal_ParseTree_Tag($compiler->parser, $compiler->processNocacheCode("", $compiler, true))); + "';?>", true))); $compiler->template->compiled->has_nocache_code = $save; return ''; } @@ -64,7 +64,7 @@ class Smarty_Internal_Compile_Private_Php extends Smarty_Internal_CompileBase $output = addcslashes($_attr['code'], "'\\"); $compiler->parser->current_buffer->append_subtree($compiler->parser, new Smarty_Internal_ParseTree_Tag($compiler->parser, $compiler->processNocacheCode("", $compiler, true))); + "';?>", true))); $compiler->template->compiled->has_nocache_code = $save; return ''; } elseif ($compiler->php_handling == Smarty::PHP_ALLOW) { diff --git a/libs/sysplugins/smarty_internal_method_adddefaultmodifiers.php b/libs/sysplugins/smarty_internal_method_adddefaultmodifiers.php index 55d2c9e7..4cd01da0 100644 --- a/libs/sysplugins/smarty_internal_method_adddefaultmodifiers.php +++ b/libs/sysplugins/smarty_internal_method_adddefaultmodifiers.php @@ -33,7 +33,7 @@ class Smarty_Internal_Method_AddDefaultModifiers { $smarty = isset($obj->smarty) ? $obj->smarty : $obj; if (is_array($modifiers)) { - $this->default_modifiers = array_merge($smarty->default_modifiers, $modifiers); + $smarty->default_modifiers = array_merge($smarty->default_modifiers, $modifiers); } else { $smarty->default_modifiers[] = $modifiers; } diff --git a/libs/sysplugins/smarty_template_compiled.php b/libs/sysplugins/smarty_template_compiled.php index 15273365..606335fc 100644 --- a/libs/sysplugins/smarty_template_compiled.php +++ b/libs/sysplugins/smarty_template_compiled.php @@ -221,7 +221,6 @@ class Smarty_Template_Compiled extends Smarty_Template_Resource_Base { $_template->source->compileds = array(); $this->file_dependency = array(); - $this->tpl_function = array(); $this->includes = array(); $this->nocache_hash = null; $this->unifunc = null;