From edceca0295348ea960adeddfc9ccb40b829b55b3 Mon Sep 17 00:00:00 2001 From: nathangray Date: Tue, 27 Nov 2018 15:56:40 -0700 Subject: [PATCH] * Calendar - Allow specifying the charset when importing ical --- .../class.addressbook_import_vcard.inc.php | 2 +- .../inc/class.calendar_import_ical.inc.php | 12 +++++++++- calendar/templates/default/import_ical.xet | 24 +++++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 calendar/templates/default/import_ical.xet diff --git a/addressbook/inc/class.addressbook_import_vcard.inc.php b/addressbook/inc/class.addressbook_import_vcard.inc.php index ea5ced4aed..65fb2112f4 100644 --- a/addressbook/inc/class.addressbook_import_vcard.inc.php +++ b/addressbook/inc/class.addressbook_import_vcard.inc.php @@ -347,7 +347,7 @@ class addressbook_import_vcard implements importexport_iface_import_plugin { 'name' => 'addressbook.import_vcard', 'content' => array( 'file_type' => 'vcard,ical,vcf', - 'vcard_charset' => $GLOBALS['egw_info']['user']['preferences']['addressbook']['vcard_charset'] + 'charset' => $GLOBALS['egw_info']['user']['preferences']['addressbook']['vcard_charset'] ), 'sel_options' => array( 'charset' => Api\Translation::get_installed_charsets() diff --git a/calendar/inc/class.calendar_import_ical.inc.php b/calendar/inc/class.calendar_import_ical.inc.php index 43ce8bd359..c1fb2f8311 100644 --- a/calendar/inc/class.calendar_import_ical.inc.php +++ b/calendar/inc/class.calendar_import_ical.inc.php @@ -279,7 +279,17 @@ class calendar_import_ical implements importexport_iface_import_plugin { * ) */ public function get_options_etpl() { - // lets do it! + return array( + 'name' => 'addressbook.import_vcard', + 'content' => array( + 'file_type' => 'ical', + 'charset' => $GLOBALS['egw_info']['user']['preferences']['common']['csv_charset'] + ), + 'sel_options' => array( + 'charset' => Api\Translation::get_installed_charsets() + ), + 'preserv' => array() + ); } /** diff --git a/calendar/templates/default/import_ical.xet b/calendar/templates/default/import_ical.xet new file mode 100644 index 0000000000..08b0b03128 --- /dev/null +++ b/calendar/templates/default/import_ical.xet @@ -0,0 +1,24 @@ + + + + + +