summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ceab6a2)
raw | patch | inline | side by side (parent: ceab6a2)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 30 Jun 2005 06:53:40 +0000 (06:53 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 30 Jun 2005 06:53:40 +0000 (06:53 +0000) |
plugins/admin/groups/class_groupManagement.inc | patch | blob | history |
diff --git a/plugins/admin/groups/class_groupManagement.inc b/plugins/admin/groups/class_groupManagement.inc
index 43b7497a6966190f8a5f7c669f15241a940cea7e..113fd9c6a46ef73361a71f399ab88891f953ab2f 100644 (file)
$error= $ldap->error;
while ($attrs= $ldap->fetch()){
$primaries[$attrs['gidNumber'][0]]= $attrs['cn'][0];
+ $primarie[$attrs['dn']]= $attrs['cn'][0];
}
+
if ($groupfilter['primarygroups'] == "checked"){
$filter.= "(&(objectClass=posixGroup)(|";
foreach ($primaries as $gidNumber => $cn){
$filter.= "(gidNumber=$gidNumber)";
}
$filter.= "))";
+ }else{
+ $filter.= "(&(objectClass=posixGroup)(&";
+ foreach ($primaries as $gidNumber => $cn){
+ $filter.= "(!gidNumber=$gidNumber)";
+ }
+ $filter.= "))";
}
-
+
/* Set filter depending on selection */
if ($groupfilter['appgroups'] == "checked"){
$filter.= "(objectClass=gosaApplicationGroup)";
$this->grouplist[$value["dn"]]= $value["cn"][0];
}
}
+
+ if($groupfilter['primarygroups']!="checked"){
+ foreach($primarie as $rm ){
+ unset($this->grouplist[$rm]);
+ }
+ }
+
natcasesort ($this->grouplist);
reset ($this->grouplist);
}