From c6e057d98f208dc3e3d03ee7ec0f624a531c98d1 Mon Sep 17 00:00:00 2001 From: Lars Kneschke Date: Thu, 1 Feb 2007 15:36:39 +0000 Subject: [PATCH] add another variant to strip the last dirctory name(should be more failsave now --- phpgwapi/inc/class.Template.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/phpgwapi/inc/class.Template.inc.php b/phpgwapi/inc/class.Template.inc.php index 374f066c4f..c8c506cf9d 100644 --- a/phpgwapi/inc/class.Template.inc.php +++ b/phpgwapi/inc/class.Template.inc.php @@ -401,7 +401,8 @@ { // $new_root = str_replace($GLOBALS['phpgw_info']['server']['template_set'],'default',$root); // $new_root = substr($root, 0, strrpos($root, $GLOBALS['phpgw_info']['server']['template_set'])).'default'; - $new_root = substr($root, 0, strlen($root) - strlen($GLOBALS['phpgw_info']['server']['template_set'])) . 'default'; +// $new_root = substr($root, 0, strlen($root) - strlen($GLOBALS['phpgw_info']['server']['template_set'])) . 'default'; + $new_root = dirname($root) . DIRECTORY_SEPARATOR . 'default'; $new_filename = $this->filename(str_replace($root.'/','',$new_filename),$new_root,2); } }