diff --git a/phpgwapi/inc/class.Template.inc.php b/phpgwapi/inc/class.Template.inc.php index 1f85c02d44..49087df7ad 100644 --- a/phpgwapi/inc/class.Template.inc.php +++ b/phpgwapi/inc/class.Template.inc.php @@ -383,8 +383,9 @@ } else { +// $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 = str_replace($GLOBALS['phpgw_info']['server']['template_set'],'default',$root); + $new_root = substr($root, 0, strlen($root) - strlen($GLOBALS['phpgw_info']['server']['template_set'])) . 'default'; $new_filename = $this->filename(str_replace($root.'/','',$new_filename),$new_root,2); } }