- added missing check if recur-endtime is before start, thanks to

Hans-Juergen
- fixed print without edit rights
This commit is contained in:
Ralf Becker 2009-10-01 19:25:05 +00:00
parent 013426f63d
commit ea04e9b4ce

View File

@ -411,12 +411,17 @@ class calendar_uiforms extends calendar_ui
case 'apply':
if ($event['id'] && !$this->bo->check_perms(EGW_ACL_EDIT,$event))
{
if ($button == 'mail') // just mail without edit-rights is ok
switch ($button)
{
case 'mail': // just mail without edit-rights is ok
$js = $this->custom_mail($event,false);
break;
break 2;
case 'print': // just print without edit-rights is ok
$js = $this->custom_print($event,false);
break 2;
}
$msg = lang('Permission denied');
$button = '';
break;
}
if ($event['start'] > $event['end'])
@ -425,6 +430,12 @@ class calendar_uiforms extends calendar_ui
$button = '';
break;
}
if ($event['recur_type'] != MCAL_RECUR_NONE && $event['recur_enddate'] && $event['start'] > $event['recur_enddate'])
{
$msg = lang('repetition').': '.lang('Error: Starttime has to be before the endtime !!!');
$button = '';
break;
}
if (!$event['participants'])
{
$msg = lang('Error: no participants selected !!!');