Configurable timezone for file export of calendar data

This commit is contained in:
Jörg Lehrke 2010-03-17 16:57:03 +00:00
parent 2978d9ddd2
commit 7f2e37b5eb
2 changed files with 29 additions and 1 deletions

View File

@ -250,6 +250,10 @@ class calendar_hooks
$freebusy_help = lang('Should not loged in persons be able to see your freebusy information? You can set an extra password, different from your normal password, to protect this informations. The freebusy information is in iCal format and only include the times when you are busy. It does not include the event-name, description or locations. The URL to your freebusy information is %1.','<a href="'.$freebusy_url.'" target="_blank">'.$freebusy_url.'</a>');
}
// Timezone for file exports
$export_tzs = array(1 => 'Use Event TZ');
$export_tzs += egw_time::getTimezones();
return array(
'defaultcalendar' => array(
'type' => 'select',
@ -425,6 +429,16 @@ class calendar_hooks
'admin' => False,
'forced' => 'ical',
),
'export_timezone' => array(
'type' => 'select',
'label' => 'Timezone of event exports',
'name' => 'export_timezone',
'values' => $export_tzs,
'help' => 'Use this timezone to export calendar data.',
'xmlrpc' => True,
'admin' => False,
'default' => '1', // Use event's TZ
),
'notifyAdded' => array(
'type' => 'notify',
'label' => 'Notification messages for added events',

View File

@ -1943,7 +1943,21 @@ class calendar_ical extends calendar_boupdate
break;
case 'file': // used outside of SyncML, eg. by the calendar itself ==> all possible fields
if (isset($this->cal_prefs['export_timezone']))
{
switch ($this->cal_prefs['export_timezone'])
{
case 1:
$this->tzid = false; // use event's TZ
break;
default:
$this->tzid = $this->cal_prefs['export_timezone'];
}
}
else
{
$this->tzid = false; // use event's TZ
}
$this->supportedFields = $defaultFields['full'];
break;