allow debug.tpl to work from arbitrary dir

This commit is contained in:
mohrt
2005-08-04 20:21:39 +00:00
parent 986640555a
commit a253dd2192
2 changed files with 2 additions and 1 deletions

1
NEWS
View File

@@ -1,3 +1,4 @@
- allow debug.tpl to work from arbitrary dir (monte)
- fix proper escaping for literal strings in
Smarty_Compiler::_parse_var_props() (boots, messju)
- remove ambiguity for numeric values passed to smarty_make_timestamp()

View File

@@ -23,7 +23,7 @@ function smarty_core_display_debug_console($params, &$smarty)
// set path to debug template from SMARTY_DIR
$smarty->debug_tpl = SMARTY_DIR . 'debug.tpl';
if($smarty->security && is_file($smarty->debug_tpl)) {
$smarty->secure_dir[] = dirname(realpath($smarty->debug_tpl));
$smarty->secure_dir[] = realpath($smarty->debug_tpl);
}
$smarty->debug_tpl = 'file:' . SMARTY_DIR . 'debug.tpl';
}