Code

Apply fix for #4271
[gosa.git] / trunk / gosa-plugins / goto / addons / goto / events / class_DaemonEvent.inc
index e46fd57e5b002ebf0dc45237afc3d421a93c87e6..b255b1a2d50e922bc4aae0fdd53a058cf35b6d36 100644 (file)
@@ -255,8 +255,22 @@ class DaemonEvent
     $this->target_list_used = TRUE;
     $divlist = new divSelectBox("EventTargets");
     foreach($this->a_targets as $key => $target){
+      $string = "";
+      if (is_array($target) && isset($target['cn'])) {
+          $string = $target['cn'];
+      }
+      if (is_array($target) && isset($target['ogroup'])) {
+        $title = sprintf(_("Added via object group '%s'"), $target['ogroup']);
+        $string .= sprintf("<img src='plugins/ogroups/images/select_ogroup.png' title=\"%s\">", $title);
+      }
+      if (is_array($target) && isset($target['mac'])) {
+        $string .= " - " . $target['mac'];
+      }else {
+        $string = $target;
+      }
+
       $divlist->AddEntry(array(
-            array("string"  => $target),
+            array("string"  => $string),
             array("string"  => "<input type='image' src='images/lists/trash.png' title='"._("Remove")."' name='del_target_".$key."'>",
               "attach"  => "style='width:20px; border-right:0px;'")
             ));