From 22cf19e174bcee88b44968f2773d1bad2da2b54d Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 18 Jul 2012 03:59:10 -0700 Subject: bad sync with github windows client --- .../libs/sysplugins/smarty_internal_debug.php | 206 --------------------- 1 file changed, 206 deletions(-) delete mode 100644 lib/smarty/libs/sysplugins/smarty_internal_debug.php (limited to 'lib/smarty/libs/sysplugins/smarty_internal_debug.php') diff --git a/lib/smarty/libs/sysplugins/smarty_internal_debug.php b/lib/smarty/libs/sysplugins/smarty_internal_debug.php deleted file mode 100644 index 2aea13f30..000000000 --- a/lib/smarty/libs/sysplugins/smarty_internal_debug.php +++ /dev/null @@ -1,206 +0,0 @@ -smarty; - } - $_assigned_vars = $ptr->tpl_vars; - ksort($_assigned_vars); - $_config_vars = $ptr->config_vars; - ksort($_config_vars); - $smarty->registered_filters = array(); - $smarty->autoload_filters = array(); - $smarty->default_modifiers = array(); - $smarty->force_compile = false; - $smarty->left_delimiter = '{'; - $smarty->right_delimiter = '}'; - $smarty->debugging = false; - $smarty->force_compile = false; - $_template = new Smarty_Internal_Template($smarty->debug_tpl, $smarty); - $_template->caching = false; - $_template->disableSecurity(); - $_template->cache_id = null; - $_template->compile_id = null; - if ($obj instanceof Smarty_Internal_Template) { - $_template->assign('template_name', $obj->source->type . ':' . $obj->source->name); - } - if ($obj instanceof Smarty) { - $_template->assign('template_data', self::$template_data); - } else { - $_template->assign('template_data', null); - } - $_template->assign('assigned_vars', $_assigned_vars); - $_template->assign('config_vars', $_config_vars); - $_template->assign('execution_time', microtime(true) - $smarty->start_time); - echo $_template->fetch(); - } - - /** - * Recursively gets variables from all template/data scopes - * - * @param Smarty_Internal_Template|Smarty_Data $obj object to debug - * @return StdClass - */ - public static function get_debug_vars($obj) - { - $config_vars = $obj->config_vars; - $tpl_vars = array(); - foreach ($obj->tpl_vars as $key => $var) { - $tpl_vars[$key] = clone $var; - if ($obj instanceof Smarty_Internal_Template) { - $tpl_vars[$key]->scope = $obj->source->type . ':' . $obj->source->name; - } elseif ($obj instanceof Smarty_Data) { - $tpl_vars[$key]->scope = 'Data object'; - } else { - $tpl_vars[$key]->scope = 'Smarty root'; - } - } - - if (isset($obj->parent)) { - $parent = self::get_debug_vars($obj->parent); - $tpl_vars = array_merge($parent->tpl_vars, $tpl_vars); - $config_vars = array_merge($parent->config_vars, $config_vars); - } else { - foreach (Smarty::$global_tpl_vars as $name => $var) { - if (!array_key_exists($name, $tpl_vars)) { - $clone = clone $var; - $clone->scope = 'Global'; - $tpl_vars[$name] = $clone; - } - } - } - return (object) array('tpl_vars' => $tpl_vars, 'config_vars' => $config_vars); - } - - /** - * Return key into $template_data for template - * - * @param object $template template object - * @return string key into $template_data - */ - private static function get_key($template) - { - static $_is_stringy = array('string' => true, 'eval' => true); - // calculate Uid if not already done - if ($template->source->uid == '') { - $template->source->filepath; - } - $key = $template->source->uid; - if (isset(self::$template_data[$key])) { - return $key; - } else { - if (isset($_is_stringy[$template->source->type])) { - self::$template_data[$key]['name'] = '\''.substr($template->source->name,0,25).'...\''; - } else { - self::$template_data[$key]['name'] = $template->source->filepath; - } - self::$template_data[$key]['compile_time'] = 0; - self::$template_data[$key]['render_time'] = 0; - self::$template_data[$key]['cache_time'] = 0; - return $key; - } - } - -} - -?> \ No newline at end of file -- cgit v1.2.3