/[cvs]/nfo/php/libs/net.php.smarty/plugins/function.assign_debug_info.php
ViewVC logotype

Contents of /nfo/php/libs/net.php.smarty/plugins/function.assign_debug_info.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Wed Oct 9 00:53:36 2002 UTC (21 years, 10 months ago) by cvsjoko
Branch: MAIN
no message

1 <?php
2
3 /*
4 * Smarty plugin
5 * -------------------------------------------------------------
6 * Type: function
7 * Name: assign_debug_info
8 * Purpose: assign debug info to the template
9 * -------------------------------------------------------------
10 */
11 function smarty_function_assign_debug_info($params, &$smarty)
12 {
13 $assigned_vars = $smarty->_tpl_vars;
14 ksort($assigned_vars);
15 if (@is_array($smarty->_config[0])) {
16 $config_vars = $smarty->_config[0];
17 ksort($config_vars);
18 $smarty->assign("_debug_config_keys", array_keys($config_vars));
19 $smarty->assign("_debug_config_vals", array_values($config_vars));
20 }
21
22 $included_templates = $smarty->_smarty_debug_info;
23
24 $smarty->assign("_debug_keys", array_keys($assigned_vars));
25 $smarty->assign("_debug_vals", array_values($assigned_vars));
26
27 $smarty->assign("_debug_tpls", $included_templates);
28 }
29
30 /* vim: set expandtab: */
31
32 ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed