changed git call from https to git readonly
[atutor.git] / mods / phpdoc2 / PhpDocumentor / phpDocumentor / Smarty-2.6.0 / libs / core / core.display_debug_console.php
1 <?php\r
2 /**\r
3  * Smarty plugin\r
4  * @package Smarty\r
5  * @subpackage plugins\r
6  */\r
7 \r
8 /**\r
9  * Smarty debug_console function plugin\r
10  *\r
11  * Type:     core<br>\r
12  * Name:     display_debug_console<br>\r
13  * Purpose:  display the javascript debug console window\r
14  * @param array Format: null\r
15  * @param Smarty\r
16  */\r
17 function smarty_core_display_debug_console($params, &$smarty)\r
18 {\r
19     // we must force compile the debug template in case the environment\r
20     // changed between separate applications.\r
21 \r
22     if(empty($smarty->debug_tpl)) {\r
23         // set path to debug template from SMARTY_DIR\r
24         $smarty->debug_tpl = SMARTY_DIR . 'debug.tpl';\r
25         if($smarty->security && is_file($smarty->debug_tpl)) {\r
26             $smarty->secure_dir[] = dirname(realpath($smarty->debug_tpl));\r
27         }\r
28     }\r
29 \r
30     $_ldelim_orig = $smarty->left_delimiter;\r
31     $_rdelim_orig = $smarty->right_delimiter;\r
32 \r
33     $smarty->left_delimiter = '{';\r
34     $smarty->right_delimiter = '}';\r
35 \r
36     $_compile_id_orig = $smarty->_compile_id;\r
37     $smarty->_compile_id = null;\r
38 \r
39     $_compile_path = $smarty->_get_compile_path($smarty->debug_tpl);\r
40     if ($smarty->_compile_resource($smarty->debug_tpl, $_compile_path))\r
41     {\r
42         ob_start();\r
43         $smarty->_include($_compile_path);\r
44         $_results = ob_get_contents();\r
45         ob_end_clean();\r
46     } else {\r
47         $_results = '';\r
48     }\r
49 \r
50     $smarty->_compile_id = $_compile_id_orig;\r
51 \r
52     $smarty->left_delimiter = $_ldelim_orig;\r
53     $smarty->right_delimiter = $_rdelim_orig;\r
54 \r
55     return $_results;\r
56 }\r
57 \r
58 /* vim: set expandtab: */\r
59 \r
60 ?>\r