diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index ab86994030..5de19f9b73 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -1216,8 +1216,9 @@ class calendar_uiforms extends calendar_ui * edit_single int timestamp of single event edited, unset/null otherwise * @param string $msg ='' msg to display * @param mixed $link_to_id ='' from or for the link-widget + * @param string $msg_type =null default automatic detect, if it contains "error" */ - function edit($event=null,$preserv=null,$msg='',$link_to_id='') + function edit($event=null,$preserv=null,$msg='',$link_to_id='',$msg_type=null) { $sel_options = array( 'recur_type' => &$this->bo->recur_types, @@ -1272,7 +1273,7 @@ class calendar_uiforms extends calendar_ui if (!empty($_GET['ical'])) { $ical = new calendar_ical(); - if (!($events = $ical->icaltoegw($_GET['ical'], '', 'utf-8')) || count($events) != 1) + if (!($events = $ical->icaltoegw($_GET['ical'], '', 'utf-8'))) { error_log(__METHOD__."('$_GET[ical]') error parsing iCal!"); $msg = lang('Error: importing the iCal'); @@ -1280,6 +1281,11 @@ class calendar_uiforms extends calendar_ui } else { + if (count($events) > 1) + { + $msg = lang('%1 events in iCal file, only first one imported and displayed!', count($events)); + $msg_type = 'notice'; // no not hide automatic + } // as icaltoegw returns timestamps in server-time, we have to convert them here to user-time $this->bo->db2data($events, 'ts'); @@ -1429,9 +1435,9 @@ class calendar_uiforms extends calendar_ui 'edit_single' => $preserv['edit_single'], // need to be in content too, as it is used in the template 'tabs' => $preserv['tabs'], 'view' => $view, - 'msg' => $msg, 'query_delete_exceptions' => (int)($event['recur_type'] && $event['recur_exception']), )); + egw_framework::message($msg, $msg_type); $content['duration'] = $content['end'] - $content['start']; if (isset($this->durations[$content['duration']])) $content['end'] = ''; diff --git a/calendar/lang/egw_de.lang b/calendar/lang/egw_de.lang index 84b65569c5..272c77e7e2 100644 --- a/calendar/lang/egw_de.lang +++ b/calendar/lang/egw_de.lang @@ -2,6 +2,7 @@ %1 days calendar de %1 Tage %1 event(s) %2 calendar de %1 Termin(e) %2 %1 event(s) %2, %3 failed because of insufficent rights !!! calendar de %1 Termin(e) %2, %3 wegen fehlender Rechte !!! +%1 events in ical file, only first one imported and displayed! calendar de %1 Termine in der iCal Datei, nur der erste wurde importiert und angezeigt! %1 hours calendar de %1 Stunden %1 minutes calendar de %1 Minuten %1 participants removed because of missing invite grants calendar de %1 Teilnehmer entfernt wegen fehlender Einladungsrechte diff --git a/calendar/lang/egw_en.lang b/calendar/lang/egw_en.lang index edc76a71b0..538584a8a2 100644 --- a/calendar/lang/egw_en.lang +++ b/calendar/lang/egw_en.lang @@ -2,6 +2,7 @@ %1 days calendar en %1 days %1 event(s) %2 calendar en %1 event(s) %2 %1 event(s) %2, %3 failed because of insufficent rights !!! calendar en %1 event(s) %2, %3 failed because of insufficient rights! +%1 events in ical file, only first one imported and displayed! calendar en %1 events in iCal file, only first one imported and displayed! %1 hours calendar en %1 hours %1 minutes calendar en %1 minutes %1 participants removed because of missing invite grants calendar en %1 participants removed because of missing invite grants.