From 49726e462338e7552d806263269cd7f905761ffc Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Tue, 3 Feb 2004 07:22:42 +0000 Subject: [PATCH] Undo last commit for now to fix bug when selecting idsociety template --- phpgwapi/inc/class.Template.inc.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/phpgwapi/inc/class.Template.inc.php b/phpgwapi/inc/class.Template.inc.php index 3c4990d33d..1f85c02d44 100644 --- a/phpgwapi/inc/class.Template.inc.php +++ b/phpgwapi/inc/class.Template.inc.php @@ -362,13 +362,13 @@ */ function filename($filename,$root='',$time=1) { - if($root=='') + if($root == '') { - $root=$this->root; + $root = $this->root; } - if (substr($filename, 0, 1) != '/') + if(substr($filename, 0, 1) != '/') { - $new_filename = $root.'/'.$filename; + $new_filename = $root . '/' . $filename; } else { @@ -383,7 +383,8 @@ } else { - $new_root = substr($root, 0, strrpos($root, $GLOBALS['phpgw_info']['server']['template_set'])).'default'; +// $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_filename = $this->filename(str_replace($root.'/','',$new_filename),$new_root,2); } }