parent)) { $ptr = $ptr->parent; } if ($obj instanceof Smarty) { $smarty = $obj; } else { $smarty = $obj->smarty; } $_assigned_vars = $ptr->tpl_vars; ksort($_assigned_vars); $_config_vars = $ptr->config_vars; ksort($_config_vars); $ldelim = $smarty->left_delimiter; $rdelim = $smarty->right_delimiter; $smarty->left_delimiter = '{'; $smarty->right_delimiter = '}'; $_template = new Smarty_Internal_Template ($smarty->debug_tpl, $smarty); $_template->caching = false; $_template->force_compile = false; $_template->disableSecurity(); $_template->cache_id = null; $_template->compile_id = null; $_template->assign('template_data', self::$template_data); $_template->assign('assigned_vars', $_assigned_vars); $_template->assign('config_vars', $_config_vars); $_template->assign('execution_time', microtime(true) - $smarty->start_time); echo $smarty->fetch($_template); $smarty->left_delimiter = $ldelim; $smarty->right_delimiter = $rdelim; } /** * get_key */ static function get_key($template) { // calculate Uid if not already done if ($template->templateUid == '') { $template->getTemplateFilepath(); } $key = $template->templateUid; if (isset(self::$template_data[$key])) { return $key; } else { self::$template_data[$key]['name'] = $template->getTemplateFilepath(); self::$template_data[$key]['compile_time'] = 0; self::$template_data[$key]['render_time'] = 0; self::$template_data[$key]['cache_time'] = 0; return $key; } } } ?>