From: hickert Date: Thu, 30 Oct 2008 08:06:10 +0000 (+0000) Subject: Updated department type detection X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f6be39a95c6edb5eefe2d56629a61a57ea1617b6;p=gosa.git Updated department type detection git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12818 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_MultiSelectWindow.inc b/gosa-core/include/class_MultiSelectWindow.inc index ebdd1a391..54df235d0 100644 --- a/gosa-core/include/class_MultiSelectWindow.inc +++ b/gosa-core/include/class_MultiSelectWindow.inc @@ -672,7 +672,7 @@ class MultiSelectWindow{ /* Get all departments within this subtree */ $s_filter = ""; - $s_attrs = array("description"); + $s_attrs = array("description","objectClass"); $s_acls = array(); foreach($types as $name => $data){ $s_filter.= "(&(objectClass=gosaDepartment)(objectClass=".$data['OC'].")(".$data['ATTR']."=".$this->base_selection_regex."))"; @@ -683,7 +683,7 @@ class MultiSelectWindow{ $tmp = get_list("(|".$s_filter.")",$s_acls,$this->selectedBase,$s_attrs,GL_NONE); foreach($tmp as $attrs){ foreach($types as $name => $data){ - if(isset($attrs[$data['ATTR']][0])){ + if(in_array($data['OC'],$attrs['objectClass']) && isset($attrs[$data['ATTR']][0])){ $attrs['NAME'] = $attrs[$data['ATTR']][0]; $attrs['TYPE'] = $data; $name = $attrs['NAME']." ".$attrs['dn'];