From 0d0710107cc5781e6a71f44a435d312b669609ce Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 6 Jun 2008 09:39:47 +0000 Subject: [PATCH] Added LDAP_FILTER_NESTING_LIMIT to baort group member resolv if member count is above LDAP_FILTER_NESTING_LIMIT git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11258 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/groups/class_groupGeneric.inc | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/gosa-core/plugins/admin/groups/class_groupGeneric.inc b/gosa-core/plugins/admin/groups/class_groupGeneric.inc index c9e3958c9..10c23d1df 100644 --- a/gosa-core/plugins/admin/groups/class_groupGeneric.inc +++ b/gosa-core/plugins/admin/groups/class_groupGeneric.inc @@ -633,11 +633,15 @@ class group extends plugin to be prepared when adding/deleting users) */ $filter = ""; - foreach ($this->memberUid as $value){ - if(!isset($this->members[$value])){ - $filter .= "(uid=".normalizeLdap($value).")"; + if(!isset($this->config->current['LDAP_FILTER_NESTING_LIMIT']) || + count($this->memberUid) < $this->config->current['LDAP_FILTER_NESTING_LIMIT']){ + foreach ($this->memberUid as $value){ + if(!isset($this->members[$value])){ + $filter .= "(uid=".normalizeLdap($value).")"; + } } } + if(!empty($filter)){ $ldap->cd($this->config->current['BASE']); $ldap->search("(&(objectClass=gosaAccount)(!(objectClass=gosaUserTemplate))(|".$filter."))",array("dn", "uid","sn","givenName")); @@ -649,11 +653,18 @@ class group extends plugin } /* check if all uids are resolved */ - foreach ($this->memberUid as $value){ - if(!isset($this->members[$value])){ - $this->members[$value] = _("! unknown id")." [".$value."]"; - } - } + if(!isset($this->config->current['LDAP_FILTER_NESTING_LIMIT']) || + count($this->memberUid) < $this->config->current['LDAP_FILTER_NESTING_LIMIT']){ + foreach ($this->memberUid as $value){ + if(!isset($this->members[$value])){ + $this->members[$value] = _("! unknown id")." [".$value."]"; + } + } + }else{ + foreach ($this->memberUid as $value){ + $this->members[$value] = $value; + } + } /* Create display list of users matching regex & filter */ -- 2.30.2