mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29: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
43873af7bc
commit
ba46b48206
@ -298,12 +298,18 @@ class calendar_import_ical implements importexport_iface_import_plugin {
|
|||||||
*/
|
*/
|
||||||
public function get_options_etpl(importexport_definition &$definition=null)
|
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(
|
return array(
|
||||||
'name' => 'calendar.import_ical',
|
'name' => 'calendar.import_ical',
|
||||||
'content' => array(
|
'content' => array(
|
||||||
'file_type' => 'ical',
|
'file_type' => 'ical',
|
||||||
'charset' => $GLOBALS['egw_info']['user']['preferences']['common']['csv_charset'],
|
'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(
|
'sel_options' => array(
|
||||||
'charset' => Api\Translation::get_installed_charsets(),
|
'charset' => Api\Translation::get_installed_charsets(),
|
||||||
|
Loading…
Reference in New Issue
Block a user