From d46937fbe328e98e7e6e334fd043f65227bba26b Mon Sep 17 00:00:00 2001 From: nathangray <nathangray.bsc+github@gmail.com> Date: Mon, 26 Jun 2017 10:46:18 -0600 Subject: [PATCH] * Calendar - Include monthly type (by weekday or by date) in recurrence rule strings --- calendar/inc/class.calendar_rrule.inc.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/calendar/inc/class.calendar_rrule.inc.php b/calendar/inc/class.calendar_rrule.inc.php index 08f744d580..6ee2fd2455 100644 --- a/calendar/inc/class.calendar_rrule.inc.php +++ b/calendar/inc/class.calendar_rrule.inc.php @@ -573,8 +573,8 @@ class calendar_rrule implements Iterator // Repeated Events if($this->type != self::NONE) { - list($str) = explode(' (',lang(self::$types[$this->type])); // remove (by day/date) from Monthly - + $str = lang(self::$types[$this->type]); + $str_extra = array(); switch ($this->type) { @@ -799,12 +799,20 @@ class calendar_rrule implements Iterator $weekdays = 0; $exceptions = array(); - list($type, $conditions) = explode(' (', $rrule); + list($type, $sub, $conditions) = explode(' (', $rrule); + if(!$conditions) + { + $conditions = $sub; + } + else + { + $type .= " ($sub"; + } $conditions = explode(', ', substr($conditions, 0, -1)); foreach(static::$types as $id => $type_name) { - list($str) = explode(' (',lang($type_name)); + $str = lang($type_name); if($str == $type) { $type_id = $id;