mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
optimize $properties array
This commit is contained in:
@@ -29,11 +29,14 @@ class Smarty_Internal_Extension_CodeFrame
|
|||||||
$properties['has_nocache_code'] = $_template->compiled->has_nocache_code;
|
$properties['has_nocache_code'] = $_template->compiled->has_nocache_code;
|
||||||
$properties['version'] = Smarty::SMARTY_VERSION;
|
$properties['version'] = Smarty::SMARTY_VERSION;
|
||||||
$properties['unifunc'] = 'content_' . str_replace(array('.', ','), '_', uniqid('', true));
|
$properties['unifunc'] = 'content_' . str_replace(array('.', ','), '_', uniqid('', true));
|
||||||
$properties['tpl_function'] = $_template->tpl_function;
|
if (!empty($_template->tpl_function)) {
|
||||||
|
$properties['tpl_function'] = $_template->tpl_function;
|
||||||
|
}
|
||||||
if (!$cache) {
|
if (!$cache) {
|
||||||
$properties['file_dependency'] = $_template->compiled->file_dependency;
|
$properties['file_dependency'] = $_template->compiled->file_dependency;
|
||||||
} else {
|
} else {
|
||||||
$properties['file_dependency'] = $_template->cached->file_dependency;
|
$properties['file_dependency'] = $_template->cached->file_dependency;
|
||||||
|
$properties['cache_lifetime'] = $_template->cache_lifetime;
|
||||||
}
|
}
|
||||||
$output = "<?php\n";
|
$output = "<?php\n";
|
||||||
$output .= "/*%%SmartyHeaderCode:{$_template->compiled->nocache_hash}%%*/\n";
|
$output .= "/*%%SmartyHeaderCode:{$_template->compiled->nocache_hash}%%*/\n";
|
||||||
|
Reference in New Issue
Block a user