summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3a48e9c)
raw | patch | inline | side by side (parent: 3a48e9c)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 22 Feb 2008 08:55:31 +0000 (08:55 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 22 Feb 2008 08:55:31 +0000 (08:55 +0000) |
-Use get_sub_list correctly
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9051 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9051 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/systems/admin/systems/class_systemManagement.inc | patch | blob | history |
diff --git a/gosa-plugins/systems/admin/systems/class_systemManagement.inc b/gosa-plugins/systems/admin/systems/class_systemManagement.inc
index 5cf90e187f49ac31703e36e61f9d037ae66e006c..1a7c6a3efa1966be5b5082cac269efd035e6a5df 100644 (file)
/* Attributes to fetch */
$sys_attrs = array("cn", "description", "macAddress", "objectClass", "sambaDomainName","gotoMode");
$sys_categories = array("terminal", "workstation", "server", "phone" ,"printer","incoming");
+ $sys_bases = array(
+ get_ou("terminalou"),
+ get_ou("workstationou"),
+ get_ou("serverou"),
+ get_ou("phoneou"),
+ get_ou("printerou"),
+ get_ou("incomingou"),
+ get_ou("componentou"));
/* Add FAIstate to attributes if FAI is activated */
$tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs'));
}
/* Walk through all possible search combinations, and search for some objects if the checkbox is enabled */
+ $filter = "(|(&".$userregex."(objectClass=goHard)(cn=".$this->DivListSystem->Regex.")))";
foreach($objs as $checkBox => $oc){
if($this->DivListSystem->$checkBox){
if($this->DivListSystem->SubSearch){
if($oc['CLASS'] != ""){
- $filter = "(&".$userregex."(objectClass=".$oc['CLASS'].")(cn=".$this->DivListSystem->Regex."))";
- $new_res = get_sub_list($filter, $sys_categories ,preg_replace("/,.*$/","",$base), $base,$sys_attrs, GL_NONE | GL_SUBSEARCH | GL_SIZELIMIT);
+ $new_res = get_sub_list($filter, $sys_categories ,$sys_bases, $base,$sys_attrs, GL_SUBSEARCH | GL_SIZELIMIT);
/* Remove all objects that are not in the expected sub department */
foreach($new_res as $key => $obj){
}else{
/* User filter? */
if($oc['CLASS'] != ""){
- $filter = "(&".$userregex."(objectClass=".$oc['CLASS'].")(cn=".$this->DivListSystem->Regex."))";
- $res = array_merge($res,get_list($filter,$sys_categories,$oc['TREE'].$base, $sys_attrs, GL_NONE | GL_SIZELIMIT));
+ $res = array_merge($res,get_list($filter,$sys_categories,$oc['TREE'].$base, $sys_attrs, GL_SIZELIMIT));
}
}
}
}
/* Search for incoming objects */
- $filter = "(|(&".$userregex."(objectClass=goHard)(cn=".$this->DivListSystem->Regex.")))";
- $res = array_merge($res,get_list($filter,$sys_categories, get_ou('incomingou').$base,$sys_attrs, GL_NONE | GL_SIZELIMIT));
+ $res = array_merge($res,get_list($filter,$sys_categories, get_ou('incomingou').$base,$sys_attrs, GL_SIZELIMIT));
/* Get all gotoTerminal's */
foreach ($res as $value){