add another variant to strip the last dirctory name(should be more failsave now

This commit is contained in:
Lars Kneschke 2007-02-01 15:36:39 +00:00
parent 1b4f5c88c7
commit c6e057d98f

View File

@ -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);
}
}