From 9697fe5b23d5b734fd90fae047fa457a2f04df86 Mon Sep 17 00:00:00 2001 From: psc Date: Wed, 22 Jul 2009 11:33:09 +0000 Subject: [PATCH] - class_DaemonEvent.inc: Do not simply reset timestamp, because it causes PHP errors when sending messages - class_DaemonEvent_notify.inc: Add missing timestamp to attributes list - gosa-si: Revert commit 13501 because the code actually needs id not to be a primary key. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13948 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../goto/addons/goto/events/class_DaemonEvent.inc | 8 +++----- .../goto/addons/goto/events/class_DaemonEvent_notify.inc | 2 +- trunk/gosa-si/gosa-si-server | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/trunk/gosa-plugins/goto/addons/goto/events/class_DaemonEvent.inc b/trunk/gosa-plugins/goto/addons/goto/events/class_DaemonEvent.inc index 575626165..b163d1b05 100644 --- a/trunk/gosa-plugins/goto/addons/goto/events/class_DaemonEvent.inc +++ b/trunk/gosa-plugins/goto/addons/goto/events/class_DaemonEvent.inc @@ -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); } diff --git a/trunk/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_notify.inc b/trunk/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_notify.inc index 13bf90dd8..e2599414b 100644 --- a/trunk/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_notify.inc +++ b/trunk/gosa-plugins/goto/addons/goto/events/class_DaemonEvent_notify.inc @@ -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()) { diff --git a/trunk/gosa-si/gosa-si-server b/trunk/gosa-si/gosa-si-server index 7d4397398..091402f96 100755 --- a/trunk/gosa-si/gosa-si-server +++ b/trunk/gosa-si/gosa-si-server @@ -200,7 +200,7 @@ my $arch = "i386"; # holds all messages which should be delivered to a user our $messaging_db; our $messaging_tn = "messaging"; -our @messaging_col_names = ("id INTEGER PRIMARY KEY", "subject TEXT", "message_from VARCHAR(255)", "message_to VARCHAR(255)", +our @messaging_col_names = ("id INTEGER", "subject TEXT", "message_from VARCHAR(255)", "message_to VARCHAR(255)", "flag VARCHAR(255)", "direction VARCHAR(255)", "delivery_time VARCHAR(255)", "message TEXT", "timestamp VARCHAR(14)" ); my $messaging_file_name; -- 2.30.2