summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0d19778)
raw | patch | inline | side by side (parent: 0d19778)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 30 Jun 2005 08:03:39 +0000 (08:03 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 30 Jun 2005 08:03:39 +0000 (08:03 +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 113fd9c6a46ef73361a71f399ab88891f953ab2f..d9463cc1e10873e5822feafb104dfeae4a33bb9f 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.= "(gidNumber=$gidNumber)";
}
$filter.= "))";
- }else{
- $filter.= "(&(objectClass=posixGroup)(&";
+ } else {
+ $filter.= "(&(objectClass=posixGroup)(!(|";
foreach ($primaries as $gidNumber => $cn){
- $filter.= "(!gidNumber=$gidNumber)";
+ $filter.= "(gidNumber=$gidNumber)";
}
- $filter.= "))";
+ $filter.= ")))";
}
+
/* Set filter depending on selection */
+ $sfilter= "";
if ($groupfilter['appgroups'] == "checked"){
$filter.= "(objectClass=gosaApplicationGroup)";
}
if ($this->config->current['SAMBAVERSION'] == 3){
- $sfilter= "(objectClass=sambaGroupMapping)";
- if ($groupfilter['sambagroups'] == "checked"){
+ if ($groupfilter['primarygroups'] != "checked"){
+ $sfilter= "(objectClass=sambaGroupMapping)";
+ } elseif ($groupfilter['sambagroups'] == "checked"){
$filter.= "(objectClass=sambaGroupMapping)";
}
- } else {
- $sfilter= "";
}
+
if ($groupfilter['mailgroups'] == "checked"){
$filter.= "(objectClass=gosaMailAccount)";
}
}
}
- if($groupfilter['primarygroups']!="checked"){
- foreach($primarie as $rm ){
- unset($this->grouplist[$rm]);
- }
- }
-
natcasesort ($this->grouplist);
reset ($this->grouplist);
}