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,11 +821,14 @@ class kolab_driver extends calendar_driver
|
||||||
*/
|
*/
|
||||||
public function dismiss_alarm($event_id, $snooze = 0)
|
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
|
// set new notifyat time or unset if not snoozed
|
||||||
$notifyat = $snooze > 0 ? date('Y-m-d H:i:s', time() + $snooze) : null;
|
$notifyat = $snooze > 0 ? date('Y-m-d H:i:s', time() + $snooze) : null;
|
||||||
|
|
||||||
$query = $this->rc->db->query(
|
$query = $this->rc->db->query(
|
||||||
"REPLACE INTO kolab_alarms
|
"INSERT INTO kolab_alarms
|
||||||
(event_id, dismissed, notifyat)
|
(event_id, dismissed, notifyat)
|
||||||
VALUES(?, ?, ?)",
|
VALUES(?, ?, ?)",
|
||||||
$event_id,
|
$event_id,
|
||||||
|
|
Loading…
Add table
Reference in a new issue