mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +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;
|
$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']))
|
if ($this->bo->check_perms(Acl::EDIT,!$content['new_alarm']['owner'] ? $event : 0,$content['new_alarm']['owner']))
|
||||||
{
|
{
|
||||||
$alarm = array(
|
$alarm = array(
|
||||||
|
Loading…
Reference in New Issue
Block a user