diff --git a/change_log.txt b/change_log.txt index 3a6915ec..c34949a4 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,5 +1,6 @@ 06/18/2009 - fixed compilation of block plugins when caching enabled +- added $smarty.current_dir which returns the current working directory 06/14/2009 - fixed array access on super globals diff --git a/libs/sysplugins/internal.compile_internal_smarty_var.php b/libs/sysplugins/internal.compile_internal_smarty_var.php index d8c510d6..72c5e59b 100644 --- a/libs/sysplugins/internal.compile_internal_smarty_var.php +++ b/libs/sysplugins/internal.compile_internal_smarty_var.php @@ -66,6 +66,9 @@ class Smarty_Internal_Compile_Internal_Smarty_Var extends Smarty_Internal_Compil case 'template': $_template_name = $compiler->template->getTemplateFilepath(); return "'$_template_name'"; + case 'current_dir': + $_template_dir_name = dirname($compiler->template->getTemplateFilepath()); + return "'$_template_dir_name'"; case 'version': $_version = Smarty::$_version;