Code

updatedimport
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 3 Jun 2008 07:53:02 +0000 (07:53 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 3 Jun 2008 07:53:02 +0000 (07:53 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11162 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/addons/goto/class_goto_import_file.inc

index 3eedfc0ff03277d8c9d812b76e6b724a6d41a3f3..4b549d88e23009f2e81271529288ede17ce203aa 100644 (file)
@@ -10,7 +10,7 @@ class goto_import_file extends plugin
   {
     plugin::plugin($config,NULL);
     $this->parent = $parent;
-    $this->daemon_events  = DaemonEvent::get_event_types( SYSTEM_EVENT);
+    $this->daemon_events  = DaemonEvent::get_event_types( SYSTEM_EVENT | HIDDEN_EVENT);
 
     $this->csv_fields = array(
         "0"=>"TIMESTAMP","1" => "MAC",  "2" => "HEADER", "3" => "OGROUP",
@@ -99,10 +99,18 @@ class goto_import_file extends plugin
             $fail ++;
             continue;
           }
+
+          /* Create event 
+           */
           $class= $this->daemon_events['QUEUED'][$event['HEADER']];
+          $o_data = $this->daemon_events['BY_CLASS'][$class];
           $object = new $class($this->config);
-          $object->set_type(TRIGGERED_EVENT);
           $object->add_targets(array($event['MAC']));
+          if($o_data['s_Schedule_Action'] == $event['HEADER']){
+            $object->set_type(SCHEDULED_EVENT);
+          }else{
+            $object->set_type(TRIGGERED_EVENT);
+          }
 
           /* Update values like fqdn a.s.o 
            */