$has_compiled_template = false;
if (($compiler->smarty->merge_compiled_includes ||
$_attr['inline'
] === true
) && !
$compiler->template->source->recompiled
&& !
($compiler->template->caching
&& ($compiler->tag_nocache ||
$compiler->nocache
)) &&
$_caching != Smarty::CACHING_LIFETIME_CURRENT
) { // check if compiled code can be merged (contains no variable part)
if (!
$compiler->has_variable_string
&& (substr_count($include_file, '"'
) == 2
or substr_count($include_file, "'"
) == 2
) and substr_count($include_file, '('
) == 0
and substr_count($include_file, '$_smarty_tpl->'
) == 0
) { $tpl_name = null;
eval("\$tpl_name =
$include_file;"
);
if (!
isset($compiler->smarty->merged_templates_func
[$tpl_name]) ||
$compiler->inheritance
) { $tpl =
new $compiler->smarty->
template_class ($tpl_name,
$compiler->smarty,
$compiler->template,
$compiler->template->cache_id,
$compiler->template->compile_id
);
// save unique function name
$compiler->smarty->merged_templates_func
[$tpl_name]['func'
] =
$tpl->properties
['unifunc'
] = 'content_'.
str_replace('.', '_',
uniqid('', true
));
// use current nocache hash for inlined code
$compiler->smarty->merged_templates_func
[$tpl_name]['nocache_hash'
] =
$tpl->properties
['nocache_hash'
] =
$compiler->template->properties
['nocache_hash'
];
if ($compiler->template->caching
) { // needs code for cached page but no cache file
$tpl->caching = self::CACHING_NOCACHE_CODE;
} // make sure whole chain gest compiled
$tpl->mustCompile = true;
if (!
($tpl->source->uncompiled
) &&
$tpl->source->exists
) {