From 1665e20373dd8fe4d5900d8d4b919aecb73d05c3 Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 14 Jul 2006 10:08:52 +0000 Subject: [PATCH] Fixed saving of 'base' scope objects git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4156 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_acl.inc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/include/class_acl.inc b/include/class_acl.inc index 9d9830993..cbd8a0c19 100644 --- a/include/class_acl.inc +++ b/include/class_acl.inc @@ -111,6 +111,8 @@ class acl extends plugin } } } + + /* Add category for all objects */ asort($this->aclObjects); /* Generate mapping object */ @@ -119,6 +121,7 @@ class acl extends plugin $class= $pl['plDepends']['objectClass']; if (!isset($this->ocMapping[$class])){ $this->ocMapping[$class]= array(); + $this->ocMapping[$class][]= '0'; } $this->ocMapping[$class][]= $oc; } @@ -231,7 +234,6 @@ class acl extends plugin $new_acl[$object][$attribute]= $value; } } - } /* Only be interested in new acl's, if we're in the right _POST place */ @@ -244,6 +246,11 @@ class acl extends plugin } } + /* Save new acl in case of base edit mode */ + if ($this->aclType == 'base'){ + $this->aclContents= $new_acl; + } + /* Cancel new acl? */ if (isset($_POST['cancel_new_acl'])){ $this->dialogState= 'head'; @@ -363,7 +370,7 @@ class acl extends plugin /* Set summary... */ if ($summary == ""){ - $summary= _("No ACL settings for this category"); + $summary= ''._("No ACL settings for this category").''; } else { $summary= sprintf(_("Contains ACLs for these objects: %s"), preg_replace('/, $/', '', $summary)); } @@ -414,6 +421,7 @@ class acl extends plugin /* Collect objects for selected category */ $aclObjects= array(); + foreach ($plist as $class => $acls){ if (isset($acls['plDepends']['objectClass']) && $acls['plDepends']['objectClass'] == $this->aclObject){ $aclObjects[$class]= $acls['plDescription']; @@ -471,9 +479,9 @@ class acl extends plugin /* Global options */ $more_options= $this->mkchkbx($key."_0_r", _("read"), preg_match('/r/', $currentAcl[0])).$spc; - $more_options.= $this->mkchkbx($key."_0_w", _("write"), preg_match('/w/', $currentAcl[0])).$spc; + $more_options.= $this->mkchkbx($key."_0_w", _("write"), preg_match('/w/', $currentAcl[0])); - $display.= "$options ".("Complete object:")." $more_options"; + $display.= "$options ".("Complete object:")." $more_options"; /* Walk through the list of attributes */ $cnt= 1; -- 2.30.2