From: cajus Date: Fri, 14 Jul 2006 11:29:58 +0000 (+0000) Subject: Removed multi-objectclass dependency. There's a more easy way to do this. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0b2eeb2d06b60b96b57107273d898e1143709f15;p=gosa.git Removed multi-objectclass dependency. There's a more easy way to do this. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4160 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_acl.inc b/include/class_acl.inc index 91a5dc569..499fcc8cb 100644 --- a/include/class_acl.inc +++ b/include/class_acl.inc @@ -102,27 +102,12 @@ class acl extends plugin if (isset($acls['plDescription'])){ /* Only feed categories */ if (isset($acls['plDepends']['description'])){ - if (is_array($acls['plDepends']['objectClass'])){ - foreach($acls['plDepends']['objectClass'] as $oc){ - $this->aclObjects[$oc]= $acls['plDepends']['description']; - } - } else { - $this->aclObjects[$acls['plDepends']['objectClass']]= $acls['plDepends']['description']; - } + $this->aclObjects[$acls['plDepends']['objectClass']]= $acls['plDepends']['description']; } /* Additionally filter the classes we're interested in in "self edit" mode */ - if (is_array($acls['plDepends']['objectClass'])){ - foreach($acls['plDepends']['objectClass'] as $hoc){ - if (in_array_ics($hoc, $oc)){ - $this->myAclObjects[$class]= $acls['plDescription']; - break; - } - } - } else { - if (in_array_ics($acls['plDepends']['objectClass'], $oc)){ - $this->myAclObjects[$class]= $acls['plDescription']; - } + if (in_array_ics($acls['plDepends']['objectClass'], $oc)){ + $this->myAclObjects[$class]= $acls['plDescription']; } } } @@ -133,20 +118,12 @@ class acl extends plugin /* Generate mapping object */ foreach ($plist as $oc => $pl){ if (isset($pl['plDepends']['objectClass'])){ - if (is_array($pl['plDepends']['objectClass'])){ - foreach($pl['plDepends']['objectClass'] as $class){ - if (!isset($this->ocMapping[$class])){ - $this->ocMapping[$class]= array(); - } - $this->ocMapping[$class][]= $oc; - } - } else { - $class= $pl['plDepends']['objectClass']; - if (!isset($this->ocMapping[$class])){ - $this->ocMapping[$class]= array(); - } - $this->ocMapping[$class][]= $oc; + $class= $pl['plDepends']['objectClass']; + if (!isset($this->ocMapping[$class])){ + $this->ocMapping[$class]= array(); + $this->ocMapping[$class][]= '0'; } + $this->ocMapping[$class][]= $oc; } } @@ -446,19 +423,8 @@ class acl extends plugin $aclObjects= array(); foreach ($plist as $class => $acls){ - if (isset($acls['plDepends']['objectClass'])){ - if (is_array($acls['plDepends']['objectClass'])){ - foreach($acls['plDepends']['objectClass'] as $coc){ - if ($coc == $this->aclObject){ - $aclObjects[$class]= $acls['plDescription']; - break; - } - } - } else { - if ($acls['plDepends']['objectClass'] == $this->aclObject){ - $aclObjects[$class]= $acls['plDescription']; - } - } + if (isset($acls['plDepends']['objectClass']) && $acls['plDepends']['objectClass'] == $this->aclObject){ + $aclObjects[$class]= $acls['plDescription']; } } diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc index 784fca967..c8a599c44 100644 --- a/plugins/personal/environment/class_environment.inc +++ b/plugins/personal/environment/class_environment.inc @@ -1251,7 +1251,7 @@ function printOutHotPlugDevices() { return (array("plDescription" => _("Environment settings"), "plSelfModify" => TRUE, - "plDepends" => array("objectClass" => array("gosaAccount", "posixGroup")), + "plDepends" => array("objectClass" => "gosaAccount"), "gotoProfileServer" => _("Profile server") , "gotoProfileFlag_L" => "FIXME"._("Resolution changeable during session") , // These variable are flags