Code

Followup commit for #3768
authorpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 24 Feb 2010 15:39:13 +0000 (15:39 +0000)
committerpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 24 Feb 2010 15:39:13 +0000 (15:39 +0000)
When saving daemon events check if timestamp is set.
Otherwise set it to the current time.

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@15699 594d385d-05f5-0310-b6e9-bd551577e9d8

trunk/gosa-plugins/goto/addons/goto/events/class_DaemonEvent.inc

index c06fa68ccb7208f9ce16913a1d56741db6d0b11d..adcea31410e9fd9ffd0ed381fe3d03c502e74547 100644 (file)
@@ -432,6 +432,10 @@ class DaemonEvent
       $ret[$attr] = $this->$attr;
     }
 
+    if(!isset($ret['timestamp'])){
+      $ret['timestamp'] = time();
+    }
+
     # Check if timestamp is in gosa-si-time-format 
     if(!tests::is_gosa_si_time($ret['timestamp'])){ 
       $ret['timestamp'] = $this->_timestamp_to_event($this->timestamp);