Code

Followup commit for #144
authorpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 1 Apr 2010 07:45:05 +0000 (07:45 +0000)
committerpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 1 Apr 2010 07:45:05 +0000 (07:45 +0000)
- When subsearch is enabled we missed to retreive the FAIclass attribute
  from LDAP for servers. Therefore the class filter and the release filter
  threated every server as one which does not have classes and/or a
  release defined
- When either a MAC-adress filter or an ip range filter is enabled,
  do not show object groups.

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@17448 594d385d-05f5-0310-b6e9-bd551577e9d8

trunk/gosa-plugins/goto/addons/goto/events/class_EventTargetAddList.inc

index 387fccf1e2088d5630f85e6f2d357cb591c17af0..88f80a42a35f027e3ea0996aec651347fd9e9fcf 100644 (file)
@@ -230,7 +230,7 @@ class EventTargetAddList extends MultiSelectWindow
         $_target_list = array_merge($_target_list,
               get_sub_list("(&(cn=".$this->regex.")(objectClass=goServer))",
               "server",get_ou("serverRDN"),$this->selectedBase,
-              array("cn","objectClass","description","ipHostNumber","macAddress"),GL_SUBSEARCH));
+              array("cn","objectClass","description","ipHostNumber","macAddress", "FAIclass"),GL_SUBSEARCH));
       }
     }
     if($this->display_workstation){
@@ -395,6 +395,11 @@ class EventTargetAddList extends MultiSelectWindow
           continue;
         }
       }elseif(in_array("gosaGroupOfNames",$obj['objectClass'])){
+        /* Do not show object groups if ip or mac filter is enabled */
+        if($this->filter_iprange || $this->filter_mac_addr) {
+          continue;
+        }
+
         if($this->filter_fai_release) {
           if (isset($obj['FAIclass'])) {
             $fai_release = split(':', $obj['FAIclass'][0]);