From: hickert Date: Mon, 28 Aug 2006 05:48:52 +0000 (+0000) Subject: Updated baseSelect, use get_list instead of ldapsearch (strict_units) X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0b818a98e14a98bd6487ea27bcdf8ae91d417e7e;p=gosa.git Updated baseSelect, use get_list instead of ldapsearch (strict_units) git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4521 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_baseSelectDialog.inc b/plugins/admin/systems/class_baseSelectDialog.inc index 6739c1848..a2569d644 100644 --- a/plugins/admin/systems/class_baseSelectDialog.inc +++ b/plugins/admin/systems/class_baseSelectDialog.inc @@ -60,22 +60,24 @@ class baseSelectDialog extends MultiSelectWindow function setEntries() { $this->ClearElementsList(); - $ldap = $this->config->get_ldap_link(); - $ldap->cd($this->selectedBase); - $ldap->ls("(&(objectClass=gosaDepartment) - (|(ou=".$this->base_selection_regex.") - (cn=".$this->base_selection_regex.") - (description=".$this->base_selection_regex.")))", - $this->selectedBase,array("ou","description","cn")); $link = "%s"; $base_back = preg_replace("/^[^,]+,/","",$this->selectedBase); $base_back = convert_department_dn($base_back); + + $filter = "(&(objectClass=gosaDepartment)". + "(|(ou=".$this->base_selection_regex.")". + "(cn=".$this->base_selection_regex.")". + "(description=".$this->base_selection_regex.")))"; + + $ui = get_userinfo(); + $res = get_list($filter,$ui->subtreeACL,$this->selectedBase,array("ou","description","cn"),GL_SIZELIMIT); + /* Add departments, to be able to switch into them */ - while($attrs = $ldap->fetch()){ + foreach($res as $attrs){ $key = $attrs['dn'] ; $val = $attrs['ou'][0];