From 141301257e496177e448d551535742136cf4be8f Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 6 Oct 2006 07:05:26 +0000 Subject: [PATCH] Fixed ogroup saving git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4865 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/fai/class_faiVariableEntry.inc | 25 ++++++++++++-------- plugins/admin/fai/faiVariableEntry.tpl | 14 +++++++---- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/plugins/admin/fai/class_faiVariableEntry.inc b/plugins/admin/fai/class_faiVariableEntry.inc index aed508d30..6dc864d17 100644 --- a/plugins/admin/fai/class_faiVariableEntry.inc +++ b/plugins/admin/fai/class_faiVariableEntry.inc @@ -62,14 +62,17 @@ class faiVariableEntry extends plugin } } - foreach($this->attributes as $attr){ - if(($this->FAIstate == "freeze") || (chkacl($this->acl,$attr)!= "")){ - $smarty->assign($attr."ACL"," disabled "); - }else{ - $smarty->assign($attr."ACL"," "); + $tmp = $this->plInfo(); + foreach($tmp['plProvidedAcls'] as $name => $translated){ + $acl = $this->getacl($name); + if($this->FAIstate == "freezed"){ + $acl = preg_replace("/w/","",$acl); } + $smarty->assign($name."ACL",$acl); } + + $display.= $smarty->fetch(get_template_path('faiVariableEntry.tpl', TRUE)); return($display); } @@ -77,12 +80,14 @@ class faiVariableEntry extends plugin /* Save data to object */ function save_object() { - if((isset($_POST['SubObjectFormSubmitted'])) && ($this->FAIstate != "freeze")){ + if((isset($_POST['SubObjectFormSubmitted'])) && ($this->FAIstate != "freeze")){ foreach($this->attributes as $attrs){ - if(isset($_POST[$attrs])){ - $this->$attrs = $_POST[$attrs]; - }else{ - $this->$attrs = ""; + if($this->acl_is_writeable($attrs)){ + if(isset($_POST[$attrs])){ + $this->$attrs = $_POST[$attrs]; + }else{ + $this->$attrs = ""; + } } } } diff --git a/plugins/admin/fai/faiVariableEntry.tpl b/plugins/admin/fai/faiVariableEntry.tpl index c4d6fc638..07f4038ad 100644 --- a/plugins/admin/fai/faiVariableEntry.tpl +++ b/plugins/admin/fai/faiVariableEntry.tpl @@ -9,7 +9,9 @@ {t}Name{/t}{$must}  - +{render acl=$cnACL} + +{/render} @@ -17,7 +19,9 @@ {t}Description{/t}  - +{render acl=$descriptionACL} + +{/render} @@ -35,7 +39,9 @@ - +{render acl=$FAIvariableContentACL} + +{/render} @@ -45,7 +51,7 @@

 


-   +  
-- 2.30.2