Code

- Add missing 'timestamp' in attributes list
authorpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 22 Jul 2009 11:28:18 +0000 (11:28 +0000)
committerpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 22 Jul 2009 11:28:18 +0000 (11:28 +0000)
- Do not simply unset the timestamp, because that
causes PHP errors when sending messages

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

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

index 575626165251341721be9b18f95388cc4bf8fef2..b163d1b0552aff03fe479d7fa38caf4b1677b736 100644 (file)
@@ -431,11 +431,9 @@ class DaemonEvent
     foreach($this->attributes as $attr){
       $ret[$attr] = $this->$attr;
     }
-    if($this->mode == SCHEDULED_EVENT){
-      $ret['timestamp'] = $this->_timestamp_to_event($this->timestamp);
-    }elseif(isset($ret['timestamp'])){
-      unset($ret['timestamp']);
-    }
+
+    $ret['timestamp'] = $this->_timestamp_to_event($this->timestamp);
+
     return($ret);
   }
 
index 13bf90dd827c484585dadc17538ad52f442278a6..e2599414b2f862d6741603323a87eb4e6fd3b159 100644 (file)
@@ -31,7 +31,7 @@ class DaemonEvent_notify extends DaemonEvent
   var $subject = "";
   var $from    = "";
 
-  var $attributes = array("from","user","group","message","subject");
+  var $attributes = array("from","user","group","message","subject","timestamp");
 
   public function __construct($config,$data = array())
   {