From 10b290c49636f162cfa8eb5887e6ba666296c1c1 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 27 Feb 2008 11:17:31 +0000 Subject: [PATCH] Updated events. -EVENTS: Return timestamp automaticall.. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9171 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../goto/addons/gotomasses/class_gotomasses.inc | 15 +++++++-------- .../gotomasses/events/class_DaemonEvent.inc | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/gosa-plugins/goto/addons/gotomasses/class_gotomasses.inc b/gosa-plugins/goto/addons/gotomasses/class_gotomasses.inc index b625e20c8..546f88df8 100644 --- a/gosa-plugins/goto/addons/gotomasses/class_gotomasses.inc +++ b/gosa-plugins/goto/addons/gotomasses/class_gotomasses.inc @@ -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; diff --git a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent.inc b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent.inc index 400f13c1b..e964f0ac1 100644 --- a/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent.inc +++ b/gosa-plugins/goto/addons/gotomasses/events/class_DaemonEvent.inc @@ -399,7 +399,7 @@ class DaemonEvent */ public function save() { - return(array()); + return(array("timestamp" => $this->_timestamp_to_event($this->timestamp))); } -- 2.30.2