X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fclass_acl.inc;h=2d9e72501b28b2e872d42c82deb8037d9d12a181;hb=f1714ac56cc41319519c97c1ab7749d4d8a637c3;hp=a9b7389ad47c798104ea73be48fe39616bd7462a;hpb=311455360c4d47bd49bb1ede461ccc71e5ff6dae;p=gosa.git diff --git a/include/class_acl.inc b/include/class_acl.inc index a9b7389ad..2d9e72501 100644 --- a/include/class_acl.inc +++ b/include/class_acl.inc @@ -28,7 +28,7 @@ class acl extends plugin var $wasNewEntry= FALSE; var $ocMapping= array(); var $savedAclContents= array(); - + var $myAclObjects = array(); function acl ($config, $parent, $dn= NULL) { @@ -187,11 +187,13 @@ class acl extends plugin $new_acl= array(); $aclDialog= FALSE; + $firstedit= FALSE; foreach($_POST as $name => $post){ /* Actions... */ if (preg_match('/^acl_edit_.*_x/', $name)){ $this->dialogState= 'create'; + $firstedit= TRUE; $this->dialog= TRUE; $this->currentIndex= preg_replace('/^acl_edit_([0-9]+).*$/', '\1', $name); $this->loadAclEntry(); @@ -263,7 +265,7 @@ class acl extends plugin } /* Only be interested in new acl's, if we're in the right _POST place */ - if ($aclDialog && is_array($this->ocMapping[$this->aclObject])){ + if ($aclDialog && $this->aclObject != "" && is_array($this->ocMapping[$this->aclObject])){ foreach ($this->ocMapping[$this->aclObject] as $oc){ unset($this->aclContents[$oc]); @@ -278,7 +280,7 @@ class acl extends plugin } /* Save new acl in case of base edit mode */ - if ($this->aclType == 'base'){ + if ($this->aclType == 'base' && !$firstedit){ $this->aclContents= $new_acl; } @@ -478,10 +480,14 @@ class acl extends plugin $tmp= get_global('plist'); $plist= $tmp->info; asort($plist); + $newSort = array(); foreach($list as $name => $translation){ $na = preg_replace("/^.*\//","",$name); - $prio= $plist[$na]['plPriority'] ; + $prio = 0; + if(isset($plist[$na]['plPriority'])){ + $prio= $plist[$na]['plPriority'] ; + } $newSort[$name] = $prio; } @@ -508,10 +514,10 @@ class acl extends plugin $display .= ""; $display .= ""; - $display .= ""; + $display .= " - "; $display .= ""; - $display .= ""; - + $display .= " - "; + $display .= ""; $display .= ""; @@ -523,10 +529,18 @@ class acl extends plugin $display .= ""; $display .= ""; $display .= ""; - $display .= ""; + $display .= " - "; + $display .= ""; + $display .= ""; + $display .= ""; + $display .= " - "; - /* Build general objects */ + $display .= ""; + $display .= ""; + $display .= ""; + $display .= ""; + /* Build general objects */ $list =$this->sort_by_priority($list); foreach ($list as $key => $name){ @@ -589,7 +603,7 @@ class acl extends plugin $display.= "\n ". "\n $options". - "\n  ".("Complete object:")." $more_options". + "\n  "._("Complete object").": $more_options". "\n "; /* Walk through the list of attributes */