From 95a4b319bbaed06bb418db30c5a35f1cc746b1bd Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 6 Feb 2023 16:23:39 -0700 Subject: [PATCH] Calendar: Fix bug in iCal import that gave bad calendar owner value --- calendar/inc/class.calendar_import_ical.inc.php | 2 +- calendar/inc/class.calendar_owner_etemplate_widget.inc.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/calendar/inc/class.calendar_import_ical.inc.php b/calendar/inc/class.calendar_import_ical.inc.php index a00e45112d..a064b9efdf 100644 --- a/calendar/inc/class.calendar_import_ical.inc.php +++ b/calendar/inc/class.calendar_import_ical.inc.php @@ -303,7 +303,7 @@ class calendar_import_ical implements importexport_iface_import_plugin { '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' => $definition->plugin_options['cal_owner'] ?: $GLOBALS['egw_info']['user']['account_id'] ), 'sel_options' => array( 'charset' => Api\Translation::get_installed_charsets() diff --git a/calendar/inc/class.calendar_owner_etemplate_widget.inc.php b/calendar/inc/class.calendar_owner_etemplate_widget.inc.php index 9874223235..a29a85e7f7 100644 --- a/calendar/inc/class.calendar_owner_etemplate_widget.inc.php +++ b/calendar/inc/class.calendar_owner_etemplate_widget.inc.php @@ -281,6 +281,11 @@ class calendar_owner_etemplate_widget extends Etemplate\Widget\Taglist */ protected static function format_owner($id, $title, $data = array()) { + if(!$id) + { + return ""; + } + static $contacts_obj = null; if(is_null($contacts_obj)) {