diff --git a/phpgwapi/inc/class.Template.inc.php b/phpgwapi/inc/class.Template.inc.php index 4a9c632467..3c4990d33d 100644 --- a/phpgwapi/inc/class.Template.inc.php +++ b/phpgwapi/inc/class.Template.inc.php @@ -383,7 +383,7 @@ } 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_filename = $this->filename(str_replace($root.'/','',$new_filename),$new_root,2); } }