X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Freminder.inc.php;h=9cf399da76adba76f082778b7b0163d77b045fc0;hb=16d2c88314364b5e79936f4262d453dff03abdad;hp=5201c8d442d886452c0a424cb7db45d2f42991b9;hpb=00ba8a742be0cfc70eef7c6aaaccebe7134ec087;p=platal.git diff --git a/include/reminder.inc.php b/include/reminder.inc.php index 5201c8d..9cf399d 100644 --- a/include/reminder.inc.php +++ b/include/reminder.inc.php @@ -72,8 +72,8 @@ 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 ({?}, {?}, {?}, {?}, {?}) - ON DUPLICATE KEY UPDATE status = VALUES(status), remind_last = NOW(), remind_next = VALUES(remind_next)', + VALUES ({?}, {?}, {?}, NOW(), {?}) + 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)); }