Code

Updated FAI template entry.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 24 Nov 2008 13:50:13 +0000 (13:50 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 24 Nov 2008 13:50:13 +0000 (13:50 +0000)
-Indentified problem with truncated template paths && upload.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13016 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc

index 46367d30b45a3d36a903eac39cbcb47cb8a153ed..ad1451a3695dcd6e7f34e4008cefe5d4e7a8ac91 100644 (file)
@@ -186,7 +186,7 @@ class faiTemplateEntry extends plugin
       /* Check if we are allowed to change the destination directory 
        */
       if($this->acl_is_writeable("cn")){
-        $cur_path = dirname($cur_path).'/'.get_post('templateFile');
+        $cur_path = preg_replace("/[^\/]*$/","",$cur_path).get_post('templateFile');
       }
       $cur_path= str_replace("//","/",$cur_path);
       if(trim($cur_path,"/") == ""){