adding some strings
[moodle-linuxchix.git] / lib / smarty / plugins / function.assign_debug_info.php
blob8015624b1f781391900d3f843a705aeb28c3f69b
1 <?php
2 /**
3 * Smarty plugin
4 * @package Smarty
5 * @subpackage plugins
6 */
8 /**
9 * Smarty {assign_debug_info} function plugin
11 * Type: function<br>
12 * Name: assign_debug_info<br>
13 * Purpose: assign debug info to the template<br>
14 * @param array unused in this plugin, this plugin uses {@link Smarty::$_config},
15 * {@link Smarty::$_tpl_vars} and {@link Smarty::$_smarty_debug_info}
16 * @param Smarty
18 function smarty_function_assign_debug_info($params, &$smarty)
20 $assigned_vars = $smarty->_tpl_vars;
21 ksort($assigned_vars);
22 if (@is_array($smarty->_config[0])) {
23 $config_vars = $smarty->_config[0];
24 ksort($config_vars);
25 $smarty->assign("_debug_config_keys", array_keys($config_vars));
26 $smarty->assign("_debug_config_vals", array_values($config_vars));
29 $included_templates = $smarty->_smarty_debug_info;
31 $smarty->assign("_debug_keys", array_keys($assigned_vars));
32 $smarty->assign("_debug_vals", array_values($assigned_vars));
34 $smarty->assign("_debug_tpls", $included_templates);
37 /* vim: set expandtab: */