mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-27 10:23:28 +01:00
Calendar: Fix error shown after importing ical
"substr(): Argument #1 ($string) must be of type string, array given"
This commit is contained in:
parent
134a82791a
commit
80b99c67ec
@ -298,12 +298,18 @@ class calendar_import_ical implements importexport_iface_import_plugin {
|
||||
*/
|
||||
public function get_options_etpl(importexport_definition &$definition=null)
|
||||
{
|
||||
$owner = $definition->plugin_options['owner'] ?? $GLOBALS['egw_info']['user']['account_id'];
|
||||
// Make sure Owner from import dialog is not array
|
||||
if(is_array($owner))
|
||||
{
|
||||
$owner = array_pop($owner);
|
||||
}
|
||||
return array(
|
||||
'name' => 'calendar.import_ical',
|
||||
'content' => array(
|
||||
'file_type' => 'ical',
|
||||
'charset' => $GLOBALS['egw_info']['user']['preferences']['common']['csv_charset'],
|
||||
'cal_owner' => [$definition->plugin_options['cal_owner'] ?: $GLOBALS['egw_info']['user']['account_id']]
|
||||
'cal_owner' => $owner ? [$owner] : null
|
||||
),
|
||||
'sel_options' => array(
|
||||
'charset' => Api\Translation::get_installed_charsets(),
|
||||
|
Loading…
Reference in New Issue
Block a user