Don't use REPLACE INTO which is mysql only (#650)
This commit is contained in:
parent
7b2b720a68
commit
3d704ab521
1 changed files with 6 additions and 3 deletions
|
@ -821,15 +821,18 @@ class kolab_driver extends calendar_driver
|
|||
*/
|
||||
public function dismiss_alarm($event_id, $snooze = 0)
|
||||
{
|
||||
// delete old alarm entry
|
||||
$this->rc->db->query("DELETE FROM kolab_alarms WHERE event_id=?", $event_id);
|
||||
|
||||
// set new notifyat time or unset if not snoozed
|
||||
$notifyat = $snooze > 0 ? date('Y-m-d H:i:s', time() + $snooze) : null;
|
||||
|
||||
|
||||
$query = $this->rc->db->query(
|
||||
"REPLACE INTO kolab_alarms
|
||||
"INSERT INTO kolab_alarms
|
||||
(event_id, dismissed, notifyat)
|
||||
VALUES(?, ?, ?)",
|
||||
$event_id,
|
||||
$snooze > 0 ? 0 : 1,
|
||||
$snooze > 0 ? 0 : 1,
|
||||
$notifyat
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue