diff --git a/calendar/inc/class.calendar_boupdate.inc.php b/calendar/inc/class.calendar_boupdate.inc.php index 1baab6e0e5..b2c9621e84 100644 --- a/calendar/inc/class.calendar_boupdate.inc.php +++ b/calendar/inc/class.calendar_boupdate.inc.php @@ -114,6 +114,7 @@ class calendar_boupdate extends calendar_bo function update(&$event,$ignore_conflicts=false,$touch_modified=true,$ignore_acl=false,$updateTS=true,&$messages=null, $skip_notification=false) { //error_log(__METHOD__."(".array2string($event).",$ignore_conflicts,$touch_modified,$ignore_acl)"); + if (!is_array($messages)) $messages = $messages ? (array)$messages : array(); if ($this->debug > 1 || $this->debug == 'update') { @@ -127,6 +128,7 @@ class calendar_boupdate extends calendar_bo $event['id'] && (isset($event['start']) && !$event['start'] || isset($event['end']) && !$event['end'] || isset($event['title']) && !$event['title'])) { + $messages[] = lang('Required information (start, end, title, ...) missing!'); return false; } @@ -150,6 +152,7 @@ class calendar_boupdate extends calendar_bo $new_event && !$this->check_perms(EGW_ACL_EDIT,0,$event['owner'])) && !$this->check_perms(EGW_ACL_ADD,0,$event['owner'])) { + $messages[] = lang('Access to calendar of %1 denied!',common::grab_owner_name($event['owner'])); return false; } if ($new_event) diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index 52498a9c6d..d09f0bc4ec 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -1723,14 +1723,22 @@ function replace_eTemplate_onsubmit() $status = strtoupper($button[0]); // A, R or T if (!$event['id']) { + // if organizer is a EGroupware user, but we have no rights to organizers calendar + if (isset($event['owner']) && !$this->bo->check_perms(EGW_ACL_ADD,0,$event['owner'])) + { + // --> make organize a participant with role chair and current user the owner + $event['participant_types']['u'] = $event['participants'][$event['owner']] = + calendar_so::combine_status('A', 1, 'CHAIR'); + $event['owner'] = $this->user; + } // store event without notifications! if (($event['id'] = $this->bo->update($event, $ignore_conflicts=true, true, false, true, $msg, true))) { - $msg = lang('Event saved'); + $msg[] = lang('Event saved'); } else { - $msg = lang('Error: saving the event !!!'); + $msg[] = lang('Error saving the event!'); break; } } @@ -1742,7 +1750,7 @@ function replace_eTemplate_onsubmit() break; } } - $event['msg'] = $msg; + $event['msg'] = implode("\n",(array)$msg); $readonlys['button[edit]'] = !$event['id']; $tpl = new etemplate('calendar.meeting'); diff --git a/calendar/lang/egw_de.lang b/calendar/lang/egw_de.lang index e3dfae16d9..3107129723 100644 --- a/calendar/lang/egw_de.lang +++ b/calendar/lang/egw_de.lang @@ -14,6 +14,7 @@ accept calendar de Zusagen accept or reject an invitation calendar de Einladung zu- oder absagen accepted calendar de Zugesagt access denied to the calendar of %1 !!! calendar de Zugriff zum Kalender von %1 verweigert !!! +access to calendar of %1 denied! calendar de Zugriff auf den Kalender von %1 verweigert! action that caused the notify: added, canceled, accepted, rejected, ... calendar de Aktion, welche die Benachrichtigung verursacht hat: Zugefügt, Storniert, Zugesagt, Abgesagt actions calendar de Befehle actions... calendar de Aktionen... @@ -375,6 +376,7 @@ requested calendar de Erforderlich requested date %1 outside allowed range of %2 days: recurring events obmitted! calendar de Gewünschtes Datum %1 außerhalb des erlauben Bereiches von %2 Tagen: wiederholdende Termine ausgelassen! requested meeting is in the past! calendar de Termin, zu dem eingeladen wird, ist in der Vergangenheit! require an acl grant to invite other users and groups admin de Freigabe um andere Benutzer oder Gruppen einzuladen erforderlich +required information (start, end, title, ...) missing! calendar de Zwingend erforderliche Information (Start, Ende, Titel, ...) fehlen! reset calendar de Zurücksetzen reset participant stati on event shifts calendar de Rücksetzen des Teilnehmerstatus beim Verschieben von Terminen resources calendar de Ressourcen diff --git a/calendar/lang/egw_en.lang b/calendar/lang/egw_en.lang index 03818a5b2d..3e7e81d155 100644 --- a/calendar/lang/egw_en.lang +++ b/calendar/lang/egw_en.lang @@ -14,6 +14,7 @@ accept calendar en Accept accept or reject an invitation calendar en Accept or reject an invitation accepted calendar en Accepted access denied to the calendar of %1 !!! calendar en Access denied to the calendar of %1 ! +access to calendar of %1 denied! calendar en Access to calendar of %1 denied! action that caused the notify: added, canceled, accepted, rejected, ... calendar en Action that caused the notify: Added, Canceled, Accepted, Rejected, ... actions calendar en Actions actions... calendar en Actions... @@ -375,6 +376,7 @@ requested calendar en Requested requested date %1 outside allowed range of %2 days: recurring events obmitted! calendar en Requested date %1 outside allowed range of %2 days: recurring events obmitted! requested meeting is in the past! calendar en Requested meeting is in the past! require an acl grant to invite other users and groups admin en Require an ACL grant to invite other users and groups +required information (start, end, title, ...) missing! calendar en Required information (start, end, title, ...) missing! reset calendar en Reset reset participant stati on event shifts calendar en Reset participant status on event shifts resources calendar en Resources