- code fixes

This commit is contained in:
uwetews
2015-12-27 08:11:31 +01:00
parent 94cc120439
commit c2f05e8c3c
7 changed files with 8 additions and 8 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -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) {

View File

@@ -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);
}

View File

@@ -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("<?php echo '" .
$output .
"';?>", $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("<?php echo '" .
$output .
"';?>", $compiler, true)));
"';?>", true)));
$compiler->template->compiled->has_nocache_code = $save;
return '';
} elseif ($compiler->php_handling == Smarty::PHP_ALLOW) {

View File

@@ -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;
}

View File

@@ -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;