From 0e141964e04fb6ba6279597ade6c13083e00aaed Mon Sep 17 00:00:00 2001 From: Henning Bostelmann Date: Fri, 13 Jul 2018 18:25:28 +0100 Subject: [PATCH] MDL-62914 Calendar: handle TZURL iCal property --- lib/bennu/iCalendar_components.php | 1 + lib/bennu/iCalendar_properties.php | 11 +++++++++++ lib/bennu/readme_moodle.txt | 3 ++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/bennu/iCalendar_components.php b/lib/bennu/iCalendar_components.php index 83a1e5f573f..9a05677726b 100644 --- a/lib/bennu/iCalendar_components.php +++ b/lib/bennu/iCalendar_components.php @@ -686,6 +686,7 @@ class iCalendar_standard extends iCalendar_component { 'RDATE' => RFC2445_OPTIONAL, 'RRULE' => RFC2445_OPTIONAL, 'TZNAME' => RFC2445_OPTIONAL, + 'TZURL' => RFC2445_OPTIONAL, RFC2445_XNAME => RFC2445_OPTIONAL, ); parent::__construct(); diff --git a/lib/bennu/iCalendar_properties.php b/lib/bennu/iCalendar_properties.php index 6a7a562c249..a99f7626427 100644 --- a/lib/bennu/iCalendar_properties.php +++ b/lib/bennu/iCalendar_properties.php @@ -1466,7 +1466,18 @@ class iCalendar_property_tzoffsetto extends iCalendar_property { } } +class iCalendar_property_tzurl extends iCalendar_property { + var $name = 'TZURL'; + var $val_type = RFC2445_TYPE_URI; + + function __construct() { + parent::__construct(); + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } +} ####################### /* diff --git a/lib/bennu/readme_moodle.txt b/lib/bennu/readme_moodle.txt index f95711aaf98..0a22a6b12cc 100644 --- a/lib/bennu/readme_moodle.txt +++ b/lib/bennu/readme_moodle.txt @@ -25,4 +25,5 @@ Changelog 6/ MDL-49032: fixed rfc2445_fold() to fix incorrect RFC2445_WSP definition (16 Sep 2015) 7/ added timestamp_to_date function to support zero duration events (16 Sept 2015) 8/ Updated \iCalendar_event::invariant_holds() to allow for same dtstart and dtend timestamps (13 July 2017) -9/ MDL-60391: replace create_function() with lambda function for PHP 7.2 compatibility (13 Oct 2017) \ No newline at end of file +9/ MDL-60391: replace create_function() with lambda function for PHP 7.2 compatibility (13 Oct 2017) +10/ MDL-62914: added handling for TZURL property (13 July 2018) \ No newline at end of file