Code

Updated events.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 27 Feb 2008 11:17:31 +0000 (11:17 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 27 Feb 2008 11:17:31 +0000 (11:17 +0000)
-EVENTS: Return timestamp automaticall..

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9171 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/addons/gotomasses/class_gotomasses.inc
gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent.inc

index b625e20c81720d06fc381c431e670d3e23f05af7..546f88df8e13a1eb19f89c64b30a3eb3d3b7927f 100644 (file)
@@ -197,22 +197,21 @@ class gotomasses extends plugin
           $header     = $this->dialog->get_schedule_action();
           $targets    = $this->dialog->get_targets();
           $data       = $this->dialog->save();
-          $data['timestamp'] = $this->dialog->get_timestamp(); 
-
 
           foreach($targets as $target){
-            $data['mac'] =  $target;
-            if(!$this->o_queue->send_data($header,$target,$data,TRUE)){
+            $data['macaddress'] =  $target;
+            $this->o_queue->send_data($header,$target,$data,TRUE);
+            if($this->o_queue->is_error()){
               msg_dialog::display(_("Daemon"),sprintf(_("Something went wrong while talking to the daemon: %s."),
                     $this->o_queue->get_error()),ERROR_DIALOG);
-            }  
+            }else{
+              $this->dialog = FALSE; 
+              $this->current = -1;
+            } 
           }
-          $this->dialog = FALSE; 
-          $this->current = -1;
         }else{
           $id                 = $this->dialog->get_id();
           $data               = $this->dialog->save();
-          $data['timestamp']  = $this->dialog->get_timestamp();
           if($this->o_queue->update_entries(array($id),$data)){
             $this->dialog = FALSE;
             $this->current = -1;
index 400f13c1b950bb6f96a7e7b665882e2714c9cfe8..e964f0ac16691bec729f340434c0f2d76738f059 100644 (file)
@@ -399,7 +399,7 @@ class DaemonEvent
    */ 
   public function save()
   {
-    return(array());
+    return(array("timestamp" => $this->_timestamp_to_event($this->timestamp)));
   }