From cce4905353f4e5af7339773984598442ea5d3dab Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 28 Apr 2006 11:05:38 +0000 Subject: [PATCH] Added administrative unit array git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3167 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_config.inc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/include/class_config.inc b/include/class_config.inc index ef1c93c66..fa1823503 100644 --- a/include/class_config.inc +++ b/include/class_config.inc @@ -45,6 +45,7 @@ class config { /* Keep a copy of the current deparment list */ var $departments= array(); var $idepartments= array(); + var $adepartments= array(); function config($filename, $basedir= "") { @@ -469,14 +470,22 @@ class config { /* Initialize result hash */ $result= array(); + $administrative= array(); $result['/']= $this->current['BASE']; /* Get list of department objects */ $ldap= $this->get_ldap_link(); $ldap->cd ($this->current['BASE']); - $ldap->search ("(objectClass=gosaDepartment)", array("ou")); + $ldap->search ("(objectClass=gosaDepartment)", array("ou", "objectClass", "gosaUnitTag")); while ($attrs= $ldap->fetch()){ $dn= $ldap->getDN(); + + /* Save administrative departments */ + if (in_array_ics("gosaAdministrativeUnit", $attrs['objectClass']) && + isset($attrs['gosaUnitTag'][0])){ + $administrative[$dn]= $attrs['gosaUnitTag']; + } + if ($dn == $ignore_dn){ continue; } @@ -487,6 +496,7 @@ class config { } } + $this->adepartments= $administrative; $this->departments= $result; } -- 2.30.2