Fixes date storage for next reminder (Closes #1475).
authorStéphane Jacob <sj@m4x.org>
Tue, 26 Apr 2011 12:01:47 +0000 (14:01 +0200)
committerStéphane Jacob <sj@m4x.org>
Tue, 26 Apr 2011 12:01:47 +0000 (14:01 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
ChangeLog
include/reminder.inc.php

index 001e140..adce71d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,9 @@ Bug/Wish:
         - #1110: Improves email combobox                                   -JAC
         - #1459: Lists and administrates aliases on main domain            -JAC
 
+    * Events:
+        - #1475: Fixes date storage for next reminder                      -JAC
+
     * Profile:
         - #1445: Add job entry year                                        -JAC
 
index 72b987d..6b8e5bf 100644 (file)
@@ -72,7 +72,7 @@ abstract class Reminder
     private static function UpdateStatus($uid, $type_id, $status, $next_ask)
     {
         XDB::execute('INSERT INTO  reminder (uid, type_id, status, remind_last, remind_next)
-                           VALUES  ({?}, {?}, {?}, NOW(), {?})
+                           VALUES  ({?}, {?}, {?}, NOW(), FROM_UNIXTIME({?}))
           ON DUPLICATE KEY UPDATE  status = VALUES(status), remind_last = VALUES(remind_last), remind_next = VALUES(remind_next)',
                      $uid, $type_id, $status,
                      ($next_ask > 0 ? time() + $next_ask * 24 * 60 * 60 : null));