Code

Added edit link to overview list of gotomasses
[gosa.git] / plugins / addons / gotomasses / class_target_list.inc
index bb91452dd27445ed37f46df15324d5a6b9f96c2a..4c1e79e726bdfb267b40ee999914b67230a32d96 100644 (file)
@@ -23,12 +23,13 @@ class target_list extends MultiSelectWindow
   var $SubSearch          ;
   var $parent             ;
   var $ui                 ;
-
-
-  
   function target_list($config,$Targets_used)
   {
     MultiSelectWindow::MultiSelectWindow($config, "Targetselection", array("ogroup","gotomasses"));
+
+    $this->Targets_used = $Targets_used;
     
     $this->SetInformation(  _("Select the target objects for your scheduled action."));
     $this->SetTitle(        _("Available targets"));
@@ -155,6 +156,9 @@ class target_list extends MultiSelectWindow
     // Assigning ogroups
     foreach($list as $key => $val){
 
+      if(in_array($val['cn'][0],$this->Targets_used) || 
+         isset($val['macAddress'][0]) && in_array($val['macAddress'][0],$this->Targets_used)) continue;
+
       $title = "title='".preg_replace('/ /', ' ', @LDAP::fix($val['dn']))."'";
       if(!isset($val['description'][0])){
         $desc = "";
@@ -210,7 +214,7 @@ class target_list extends MultiSelectWindow
     $Regex    = $this->Regex;
 
     $chk = array(
-        "ogroups"       => "(objectClass=gosaGroupOfNames)" ,
+        "ogroups"       => "(&(objectClass=gosaGroupOfNames)(|(gosaGroupObjects=*S*)(gosaGroupObjects=*W*)))" ,
         "servers"       => "(objectClass=goServer)" ,
         "workstations"  => "(objectClass=gotoWorkstation)");