mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-20 21:50:49 +01:00
* Calendar/Filemanager: display warning when clicking on an iCal file with more then 1 event, only first one is displayed
This commit is contained in:
parent
1e75cd8a92
commit
a10f45ec79
@ -1202,8 +1202,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,
|
||||
@ -1258,7 +1259,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');
|
||||
@ -1266,6 +1267,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');
|
||||
|
||||
@ -1415,9 +1421,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'] = '';
|
||||
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user