From: Stéphane Jacob Date: Tue, 26 Apr 2011 12:01:47 +0000 (+0200) Subject: Fixes date storage for next reminder (Closes #1475). X-Git-Tag: xorg/1.1.1~56 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=4a8caa3efb1c16c49873e70af3bf0d03f2947cbb;p=platal.git Fixes date storage for next reminder (Closes #1475). Signed-off-by: Stéphane Jacob --- diff --git a/ChangeLog b/ChangeLog index 001e140..adce71d 100644 --- 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 diff --git a/include/reminder.inc.php b/include/reminder.inc.php index 72b987d..6b8e5bf 100644 --- a/include/reminder.inc.php +++ b/include/reminder.inc.php @@ -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));