Restore calendar_driver::dismiss_birthday_alarm() method which accidentally got removed in commit 51fe7c26
This commit is contained in:
parent
1f27e238a8
commit
bde037ce0e
1 changed files with 19 additions and 0 deletions
|
@ -684,6 +684,25 @@ abstract class calendar_driver
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store alarm dismissal for birtual birthay events
|
||||||
|
*
|
||||||
|
* @param string Event identifier
|
||||||
|
* @param integer Suspend the alarm for this number of seconds
|
||||||
|
*/
|
||||||
|
public function dismiss_birthday_alarm($event_id, $snooze = 0)
|
||||||
|
{
|
||||||
|
$rcmail = rcmail::get_instance();
|
||||||
|
$cache = $rcmail->get_cache('calendar.birthdayalarms', 'db', 86400 * 30);
|
||||||
|
$cache->remove($event_id);
|
||||||
|
|
||||||
|
// compute new notification time or disable if not snoozed
|
||||||
|
$notifyat = $snooze > 0 ? time() + $snooze : null;
|
||||||
|
$cache->set($event_id, array('snooze' => $snooze, 'notifyat' => $notifyat));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handler for user_delete plugin hook
|
* Handler for user_delete plugin hook
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue