mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +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
91750f46c9
commit
e276fa10a2
@ -1216,8 +1216,9 @@ class calendar_uiforms extends calendar_ui
|
|||||||
* edit_single int timestamp of single event edited, unset/null otherwise
|
* edit_single int timestamp of single event edited, unset/null otherwise
|
||||||
* @param string $msg ='' msg to display
|
* @param string $msg ='' msg to display
|
||||||
* @param mixed $link_to_id ='' from or for the link-widget
|
* @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(
|
$sel_options = array(
|
||||||
'recur_type' => &$this->bo->recur_types,
|
'recur_type' => &$this->bo->recur_types,
|
||||||
@ -1272,7 +1273,7 @@ class calendar_uiforms extends calendar_ui
|
|||||||
if (!empty($_GET['ical']))
|
if (!empty($_GET['ical']))
|
||||||
{
|
{
|
||||||
$ical = new calendar_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!");
|
error_log(__METHOD__."('$_GET[ical]') error parsing iCal!");
|
||||||
$msg = lang('Error: importing the iCal');
|
$msg = lang('Error: importing the iCal');
|
||||||
@ -1280,6 +1281,11 @@ class calendar_uiforms extends calendar_ui
|
|||||||
}
|
}
|
||||||
else
|
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
|
// as icaltoegw returns timestamps in server-time, we have to convert them here to user-time
|
||||||
$this->bo->db2data($events, 'ts');
|
$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
|
'edit_single' => $preserv['edit_single'], // need to be in content too, as it is used in the template
|
||||||
'tabs' => $preserv['tabs'],
|
'tabs' => $preserv['tabs'],
|
||||||
'view' => $view,
|
'view' => $view,
|
||||||
'msg' => $msg,
|
|
||||||
'query_delete_exceptions' => (int)($event['recur_type'] && $event['recur_exception']),
|
'query_delete_exceptions' => (int)($event['recur_type'] && $event['recur_exception']),
|
||||||
));
|
));
|
||||||
|
egw_framework::message($msg, $msg_type);
|
||||||
$content['duration'] = $content['end'] - $content['start'];
|
$content['duration'] = $content['end'] - $content['start'];
|
||||||
if (isset($this->durations[$content['duration']])) $content['end'] = '';
|
if (isset($this->durations[$content['duration']])) $content['end'] = '';
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
%1 days calendar de %1 Tage
|
%1 days calendar de %1 Tage
|
||||||
%1 event(s) %2 calendar de %1 Termin(e) %2
|
%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 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 hours calendar de %1 Stunden
|
||||||
%1 minutes calendar de %1 Minuten
|
%1 minutes calendar de %1 Minuten
|
||||||
%1 participants removed because of missing invite grants calendar de %1 Teilnehmer entfernt wegen fehlender Einladungsrechte
|
%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 days calendar en %1 days
|
||||||
%1 event(s) %2 calendar en %1 event(s) %2
|
%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 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 hours calendar en %1 hours
|
||||||
%1 minutes calendar en %1 minutes
|
%1 minutes calendar en %1 minutes
|
||||||
%1 participants removed because of missing invite grants calendar en %1 participants removed because of missing invite grants.
|
%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