From cc916878264282818821471f48a03117c5ffe7eb Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 1 Oct 2009 19:21:37 +0000 Subject: [PATCH] "fixed print without edit rights" --- calendar/inc/class.calendar_uiforms.inc.php | 22 +++++++-------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index c32e9aeef4..8a6ee29162 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -433,27 +433,19 @@ 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) { - $js = $this->custom_mail($event,false); - break; - } - $msg = lang('Permission denied'); - break; - } - - if ($event['id'] && !$this->bo->check_perms(EGW_ACL_EDIT,$event)) - { - if ($button == 'print') // just print without edit-rights is ok - { - $js = $this->custom_print($event,false); - break; + case 'mail': // just mail without edit-rights is ok + $js = $this->custom_mail($event,false); + 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']) { $msg = lang('Error: Starttime has to be before the endtime !!!');