From 28a0a7e01a53c0f873d4b6bee9fa00847d7bff34 Mon Sep 17 00:00:00 2001 From: iliaa Date: Wed, 28 Jan 2004 19:36:52 +0000 Subject: [PATCH] Fixed a bug that could result in an invalid path being picked for default template path if the theme name can be found >1 inside the path. Ex. /home/foobar/www/egw/app/foo would become /home/defaultbar/www/egw/app/default --- phpgwapi/inc/class.Template.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } }