mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
Calendar: Do not allow duplicate alarms
This commit is contained in:
parent
836a3b07e3
commit
d46210be4c
@ -1053,6 +1053,17 @@ class calendar_uiforms extends calendar_ui
|
||||
{
|
||||
$content['new_alarm']['date'] = $next_occurrence['start'] - $offset;
|
||||
}
|
||||
// Avoid duplicates
|
||||
foreach($content['alarm'] as $key => $alarm)
|
||||
{
|
||||
if($alarm['offset'] == $offset && (
|
||||
($alarm['all'] && $content['new_alarm']['owner'] == 0) ||
|
||||
(!$alarm['all'] && $alarm['owner'] == $content['new_alarm']['owner'])
|
||||
))
|
||||
{
|
||||
break 2;
|
||||
}
|
||||
}
|
||||
if ($this->bo->check_perms(Acl::EDIT,!$content['new_alarm']['owner'] ? $event : 0,$content['new_alarm']['owner']))
|
||||
{
|
||||
$alarm = array(
|
||||
|
Loading…
Reference in New Issue
Block a user