summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 032436e)
raw | patch | inline | side by side (parent: 032436e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 29 Feb 2008 08:42:21 +0000 (08:42 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 29 Feb 2008 08:42:21 +0000 (08:42 +0000) |
-udpated save / updated of events
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9200 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9200 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/addons/gotomasses/class_gotomasses.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/addons/gotomasses/class_gotomasses.inc b/gosa-plugins/goto/addons/gotomasses/class_gotomasses.inc
index 5ac236d78553aa97ecaaca8e9aaee26e02c8a170..3db5527c91a1275c18617e303dfd18c67a73efdb 100644 (file)
if(isset($_POST['save_event_dialog'])){
if(is_object($this->dialog)){
$this->dialog->save_object();
- if($this->dialog->is_new()){
- $header = $this->dialog->get_schedule_action();
- $targets = $this->dialog->get_targets();
- $data = $this->dialog->save();
-
- foreach($targets as $target){
- $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;
- }
- }
+ if(!$this->o_queue->append($this->dialog)){
+ msg_dialog::display(_("Daemon"),sprintf(_("Something went wrong while talking to the daemon: %s."),
+ $this->o_queue->get_error()),ERROR_DIALOG);
}else{
- $id = $this->dialog->get_id();
- $data = $this->dialog->save();
- if($this->o_queue->update_entries(array($id),$data)){
- $this->dialog = FALSE;
- $this->current = -1;
- }else{
- msg_dialog::display(_("Daemon"),sprintf(_("Something went wrong while talking to the daemon: %s."),
- $this->o_queue->get_error()),ERROR_DIALOG);
- }
- }
+ $this->dialog = FALSE;
+ $this->current = -1;
+ }
}
}