X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fclass_acl.inc;h=f3fed5371fa5cb4c5be52d753228c1f99e93d815;hb=87a10c71fc4a79af78f6648f0dc25df415baf892;hp=8103ba16e8e4a756dfbf215a447f9113d656eeef;hpb=9a7a2ec9cf7dad5bbef318ccb13f293ea6b27b0d;p=gosa.git diff --git a/include/class_acl.inc b/include/class_acl.inc index 8103ba16e..f3fed5371 100644 --- a/include/class_acl.inc +++ b/include/class_acl.inc @@ -27,7 +27,6 @@ class acl extends plugin var $currentIndex= 0; var $wasNewEntry= FALSE; var $ocMapping= array(); - var $multiClass= array(); var $savedAclContents= array(); @@ -107,11 +106,6 @@ class acl extends plugin /* Only feed categories */ if (isset($acls['plCategory'])){ - /* Find multi homed classes */ - if (count($acls['plCategory']) > 1){ - $this->multiClass[$class]= $class; - } - /* Walk through supplied list and feed only translated categories */ foreach($acls['plCategory'] as $idx => $data){ @@ -134,21 +128,13 @@ class acl extends plugin if (is_array($data['objectClass'])){ foreach($data['objectClass'] as $objectClass){ if (in_array_ics($objectClass, $oc)){ - if (isset($this->multiClass[$class])){ - $this->myAclObjects[$idx.'/'.$class]= $acls['plDescription']; - } else { - $this->myAclObjects[$class]= $acls['plDescription']; - } + $this->myAclObjects[$idx.'/'.$class]= $acls['plDescription']; break; } } } else { if (in_array_ics($data['objectClass'], $oc)){ - if (isset($this->multiClass[$class])){ - $this->myAclObjects[$idx.'/'.$class]= $acls['plDescription']; - } else { - $this->myAclObjects[$class]= $acls['plDescription']; - } + $this->myAclObjects[$idx.'/'.$class]= $acls['plDescription']; } } } @@ -156,6 +142,8 @@ class acl extends plugin } } } + $this->aclObjects['all']= '* '._("All categories"); + $this->ocMapping['all']= array('0' => 'all'); /* Sort categories */ asort($this->aclObjects); @@ -461,16 +449,14 @@ class acl extends plugin $smarty->assign('headline', sprintf(_("Edit ACL for '%s', scope is '%s'"), $this->aclObjects[$this->aclObject], $this->aclTypes[$this->aclType])); /* Collect objects for selected category */ - $aclObjects= array(); foreach ($this->ocMapping[$this->aclObject] as $idx => $class){ if ($idx == 0){ continue; } - if (isset($this->multiClass[$class])){ - $aclObjects[$this->aclObject.'/'.$class]= $plist[$class]['plDescription']; - } else { - $aclObjects[$class]= $plist[$class]['plDescription']; - } + $aclObjects[$this->aclObject.'/'.$class]= $plist[$class]['plDescription']; + } + if ($this->aclObject == 'all'){ + $aclObjects['all']= _("All objects in current subtree"); } $smarty->assign('aclSelector', $this->buildAclSelector($aclObjects)); } @@ -501,7 +487,15 @@ class acl extends plugin $currentAcl= $this->aclContents[$key]; /* Object header */ - $display.= ""; + if($_SESSION['js']) { + if(isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/firefox/i",$_SERVER['HTTP_USER_AGENT'])) { + $display.= "
"._("Object").": $name
"; + } else { + $display.= "
"._("Object").": $name
"; + } + } else { + $display.= "
"._("Object").": $name
"; + } /* Generate options */ $spc= "  "; @@ -530,6 +524,11 @@ class acl extends plugin $cnt= 1; $splist= $plist[preg_replace('%^.*/%', '', $key)]['plProvidedAcls']; asort($splist); + if($_SESSION['js']) { + if(isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/firefox/i",$_SERVER['HTTP_USER_AGENT'])) { + $display.= "
"._("Object").": $name
"; + } + } + + $display.= "
"; } return ($display);