internationalization bug fix - translate submit button
[openemr.git] / library / core / core.display_debug_console.php
blobc509ff72f39f64686279228ba88d32187e2e1024
1 <?php
2 /**
3 * Smarty plugin
4 * @package Smarty
5 * @subpackage plugins
6 */
8 /**
9 * Smarty debug_console function plugin
11 * Type: core<br>
12 * Name: display_debug_console<br>
13 * Purpose: display the javascript debug console window
14 * @param array Format: null
15 * @param Smarty
17 function smarty_core_display_debug_console($params, &$smarty)
19 // we must force compile the debug template in case the environment
20 // changed between separate applications.
22 if(empty($smarty->debug_tpl)) {
23 // set path to debug template from SMARTY_DIR
24 $smarty->debug_tpl = SMARTY_DIR . 'debug.tpl';
25 if($smarty->security && is_file($smarty->debug_tpl)) {
26 $smarty->secure_dir[] = dirname(realpath($smarty->debug_tpl));
30 $_ldelim_orig = $smarty->left_delimiter;
31 $_rdelim_orig = $smarty->right_delimiter;
33 $smarty->left_delimiter = '{';
34 $smarty->right_delimiter = '}';
36 $_compile_id_orig = $smarty->_compile_id;
37 $smarty->_compile_id = null;
39 $_compile_path = $smarty->_get_compile_path($smarty->debug_tpl);
40 if ($smarty->_compile_resource($smarty->debug_tpl, $_compile_path))
42 ob_start();
43 $smarty->_include($_compile_path);
44 $_results = ob_get_contents();
45 ob_end_clean();
46 } else {
47 $_results = '';
50 $smarty->_compile_id = $_compile_id_orig;
52 $smarty->left_delimiter = $_ldelim_orig;
53 $smarty->right_delimiter = $_rdelim_orig;
55 return $_results;
58 /* vim: set expandtab: */