Редакция 2 | Только различия | Учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 2 | Редакция 48 | ||
---|---|---|---|
1 | <?php
|
1 | <?php
|
2 | /**
|
2 | /**
|
3 | * Smarty plugin
|
3 | * Smarty plugin
|
4 | * @package Smarty
|
4 | * @package Smarty
|
5 | * @subpackage plugins
|
5 | * @subpackage plugins
|
6 | */
|
6 | */
|
7 | 7 | ||
8 | 8 | ||
9 | /**
|
9 | /**
|
10 | * Smarty {debug} function plugin
|
10 | * Smarty {debug} function plugin
|
11 | *
|
11 | *
|
12 | * Type: function<br>
|
12 | * Type: function<br>
|
13 | * Name: debug<br>
|
13 | * Name: debug<br>
|
14 | * Date: July 1, 2002<br>
|
14 | * Date: July 1, 2002<br>
|
15 | * Purpose: popup debug window
|
15 | * Purpose: popup debug window
|
16 | * @link http://smarty.php.net/manual/en/language.function.debug.php {debug}
|
16 | * @link http://smarty.php.net/manual/en/language.function.debug.php {debug}
|
17 | * (Smarty online manual)
|
17 | * (Smarty online manual)
|
18 | * @author Monte Ohrt <monte at ohrt dot com>
|
18 | * @author Monte Ohrt <monte at ohrt dot com>
|
19 | * @version 1.0
|
19 | * @version 1.0
|
20 | * @param array
|
20 | * @param array
|
21 | * @param Smarty
|
21 | * @param Smarty
|
22 | * @return string output from {@link Smarty::_generate_debug_output()}
|
22 | * @return string output from {@link Smarty::_generate_debug_output()}
|
23 | */
|
23 | */
|
24 | function smarty_function_debug($params, &$smarty) |
24 | function smarty_function_debug($params, &$smarty) |
25 | {
|
25 | {
|
26 | if (isset($params['output'])) { |
26 | if (isset($params['output'])) { |
27 | $smarty->assign('_smarty_debug_output', $params['output']); |
27 | $smarty->assign('_smarty_debug_output', $params['output']); |
28 | }
|
28 | }
|
29 | require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php'); |
29 | require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php'); |
30 | return smarty_core_display_debug_console(null, $smarty); |
30 | return smarty_core_display_debug_console(null, $smarty); |
31 | }
|
31 | }
|
32 | 32 | ||
33 | /* vim: set expandtab: */
|
33 | /* vim: set expandtab: */
|
34 | 34 | ||
35 | ?>
|
35 | ?>
|
36 | 36 |