From d6afede8f8c15118694d766ff81e557c7c041be5 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 4 Nov 2008 13:48:47 +0000 Subject: [PATCH] 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 --- gosa-plugins/fai/admin/fai/class_faiTemplateEntry.inc | 11 ++++------- gosa-plugins/fai/admin/fai/faiTemplateEntry.tpl | 4 ++-- 2 files changed, 6 insertions(+), 9 deletions(-) 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} -- 2.30.2