Code

Upated gotomasses
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 27 Feb 2008 11:11:03 +0000 (11:11 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 27 Feb 2008 11:11:03 +0000 (11:11 +0000)
-Updated error will be displayed now.

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

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

index 28c23e2d7ab1e198e0039c969e88ce773bb304fd..b625e20c81720d06fc381c431e670d3e23f05af7 100644 (file)
@@ -191,9 +191,8 @@ class gotomasses extends plugin
 
     /* Close dialog */
     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();
@@ -203,7 +202,7 @@ class gotomasses extends plugin
 
           foreach($targets as $target){
             $data['mac'] =  $target;
-            if(!$this->o_queue->send($header,$target,$data,TRUE)){
+            if(!$this->o_queue->send_data($header,$target,$data,TRUE)){
               msg_dialog::display(_("Daemon"),sprintf(_("Something went wrong while talking to the daemon: %s."),
                     $this->o_queue->get_error()),ERROR_DIALOG);
             }  
@@ -217,6 +216,9 @@ class gotomasses extends plugin
           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);
           }
         }
       }