From: cajus Date: Fri, 30 Mar 2007 13:57:38 +0000 (+0000) Subject: Needs to be checked. Speedup for group display. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4f9a5c6c393cba8d1357fed4020feefe8776204f;p=gosa.git Needs to be checked. Speedup for group display. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5941 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/groups/class_groupManagement.inc b/plugins/admin/groups/class_groupManagement.inc index b335629ea..d4d814e64 100644 --- a/plugins/admin/groups/class_groupManagement.inc +++ b/plugins/admin/groups/class_groupManagement.inc @@ -424,8 +424,13 @@ class groupManagement extends plugin /* Collect primary groupIDs to show primary groups if this option is enabled in gosa conf && the checkbox is checked */ if ($this->ShowPrimaryCheckBox){ - $res = get_list("(&(uid=$Regex)(!(uid=*$))(objectClass=posixAccount)(gidNumber=*))", $this->ui->subtreeACL, - $base,array("gidNumber", "cn"), GL_SUBSEARCH); + if ($SubSearch){ + $res = get_list("(&(uid=$Regex)(!(uid=*$))(objectClass=posixAccount)(gidNumber=*))", $this->ui->subtreeACL, + $base,array("gidNumber", "cn"), GL_SUBSEARCH); + } else { + $res = get_list("(&(uid=$Regex)(!(uid=*$))(objectClass=posixAccount)(gidNumber=*))", $this->ui->subtreeACL, + $base,array("gidNumber", "cn")); + } foreach ($res as $attrs){ $primaries[$attrs['gidNumber'][0]]= $attrs['cn'][0]; } @@ -434,7 +439,11 @@ class groupManagement extends plugin /* Collect all GroupIDs from those groups which are functional. Only perfrom this search if ShowFunctionalGroups is unchecked, else leave arre empty */ $ff = "(&(cn=$Regex)(objectClass=posixGroup)(!(|(objectClass=gosaMailAccount)(objectClass=gosaApplicationGroup)$sfilter)))"; - $res = get_list($ff,$this->ui->subtreeACL,$base,array("gidNumber", "cn", "description"), GL_SUBSEARCH); + if ($SubSearch){ + $res = get_list($ff,$this->ui->subtreeACL,$base,array("gidNumber", "cn", "description"), GL_SUBSEARCH); + } else { + $res = get_list($ff,$this->ui->subtreeACL,$base,array("gidNumber", "cn", "description")); + } foreach($res as $attrs){ if (!isset($primaries[$attrs['gidNumber'][0]])){ $functional[$attrs['gidNumber'][0]]= $attrs['gidNumber'][0];