Code

Fixed display of section/object assignements
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 26 Jul 2006 06:28:34 +0000 (06:28 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 26 Jul 2006 06:28:34 +0000 (06:28 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4303 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_acl.inc

index 8870d1a2cc2b6da8e1aeba76c907a83677fff2af..fe19f9a7ef7e24253a36cfb8685e47dc39d7e92e 100644 (file)
@@ -27,6 +27,7 @@ class acl extends plugin
   var $currentIndex= 0;
   var $wasNewEntry= FALSE;
   var $ocMapping= array();
+  var $multiClass= array();
   var $savedAclContents= array();
 
 
@@ -106,6 +107,11 @@ class acl extends plugin
       /* Only feed categories */
       if (isset($acls['plCategory'])){
 
+        /* Find multi homed classes */
+        if (count($acls['plCategory']) > 1){
+          $this->multiClass[]= $class;
+        }
+
         /* Walk through supplied list and feed only translated categories */
         foreach($acls['plCategory'] as $idx => $data){
 
@@ -146,7 +152,6 @@ class acl extends plugin
     /* Sort categories */
     asort($this->aclObjects);
 
-
     /* Fill acl types */
     if ($this->isContainer){
       $this->aclTypes= array("reset" => _("Reset ACLs"),
@@ -377,6 +382,13 @@ class acl extends plugin
         foreach($this->ocMapping[$section] as $oc){
           if (isset($this->aclContents[$oc]) && count($this->aclContents[$oc]) && isset($this->aclContents[$oc][0]) &&
               $this->aclContents[$oc][0] != ""){
+
+            $summary.= "$oc, ";
+            continue;
+          }
+          if (isset($this->aclContents["$section/$oc"]) && count($this->aclContents["$section/$oc"]) && isset($this->aclContents["$section/$oc"][0]) &&
+              $this->aclContents["$section/$oc"][0] != ""){
+
             $summary.= "$oc, ";
             continue;
           }