mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 17:48:56 +01:00
Calendar: Fix import/export timezone preference had no options
This commit is contained in:
parent
6ecb2d8cf9
commit
c3d961adbe
@ -254,7 +254,25 @@ class calendar_hooks
|
||||
|
||||
// Timezone for file exports
|
||||
$export_tzs = array(['value' => '0', 'label' => lang('Use Event TZ')]);
|
||||
$export_tzs += Api\DateTime::getTimezones();
|
||||
$tz_list = Api\DateTime::getTimezones();
|
||||
|
||||
// Format for select
|
||||
$format = function ($key, $value) use (&$format, &$tzs)
|
||||
{
|
||||
if(is_array($value))
|
||||
{
|
||||
$value = [
|
||||
'label' => $key,
|
||||
'value' => array_map($format, array_keys($value), array_values($value))
|
||||
];
|
||||
}
|
||||
else
|
||||
{
|
||||
$value = ['label' => $value, 'value' => $key];
|
||||
}
|
||||
return $value;
|
||||
};
|
||||
$export_tzs = array_merge($export_tzs, array_map($format, array_keys($tz_list), array_values($tz_list)));
|
||||
}
|
||||
$link_title_options = calendar_bo::get_link_options();
|
||||
$settings = array(
|
||||
|
Loading…
Reference in New Issue
Block a user