From: hickert Date: Tue, 4 Nov 2008 13:48:47 +0000 (+0000) Subject: Updated FAItemplate handling, do not mess around with path and file X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d6afede8f8c15118694d766ff81e557c7c041be5;p=gosa.git Updated FAItemplate handling, do not mess around with path and file git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12894 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc b/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc index c784a6e16..1dfb7e090 100644 --- a/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc +++ b/gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc @@ -126,14 +126,12 @@ class faiTemplateEntry extends plugin } } - $smarty->assign("FAItemplateFile",""); - foreach($this->attributes as $attr){ $smarty->assign($attr."ACL",$this->getacl($attr,preg_match("/freeze/",$this->FAIstate))); } /* We now split cn/FAItemplatePath to make things more clear... */ - $smarty->assign("cn", basename($this->FAItemplatePath)); + $smarty->assign("templateFile", basename($this->FAItemplatePath)); $smarty->assign("templatePath", dirname($this->FAItemplatePath)); $smarty->assign("freeze", preg_match("/freeze/i",$this->FAIstate));; @@ -182,15 +180,15 @@ class faiTemplateEntry extends plugin /* Check if we are allowed to change the destination directory */ if($this->acl_is_writeable("FAItemplatePath")){ - $cur_path = $this->FAItemplatePath.'/'.basename($cur_path); + $cur_path = get_post('templatePath').'/'.basename($cur_path); } /* Check if we are allowed to change the destination directory */ if($this->acl_is_writeable("cn")){ - $cur_path = dirname($cur_path).'/'.$this->cn; + $cur_path = dirname($cur_path).'/'.get_post('templateFile'); } - $this->FAItemplatePath = $cur_path; + $this->FAItemplatePath = $this->cn= $cur_path; } } @@ -244,7 +242,6 @@ class faiTemplateEntry extends plugin $tmp[$attrs] = $this->$attrs; } - $tmp['cn'] = $this->FAItemplatePath; if(($this->orig_cn)&&($tmp['cn']!=$this->orig_cn)){ $tmp['remove']['from'] = $this->orig_cn; $tmp['remove']['to'] = $tmp['cn']; diff --git a/gosa-plugins/fai/admin/fai/faiTemplateEntry.tpl b/gosa-plugins/fai/admin/fai/faiTemplateEntry.tpl index 58d3569b0..4e468e66c 100644 --- a/gosa-plugins/fai/admin/fai/faiTemplateEntry.tpl +++ b/gosa-plugins/fai/admin/fai/faiTemplateEntry.tpl @@ -11,7 +11,7 @@ {render acl=$cnACL} -    +    {/render} @@ -23,7 +23,7 @@ {render acl=$FAItemplatePathACL} - + {/render}