diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-01-26 15:46:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-26 15:46:46 +0100 |
commit | c67736a54246dddfdbe41883527bc0d6d54067c6 (patch) | |
tree | 98d30796351a588d437cf5fe11c37f9c2974db57 /apps/dav/lib/CalDAV | |
parent | 08d184816fd0934de626e477cf4afe7c90d13461 (diff) | |
parent | 1b8fc260c6f06ddeb948f55a2985a20fb9149c3d (diff) | |
download | nextcloud-server-c67736a54246dddfdbe41883527bc0d6d54067c6.tar.gz nextcloud-server-c67736a54246dddfdbe41883527bc0d6d54067c6.zip |
Merge pull request #7707 from nextcloud/bugfix/noid/birthdaycalendar-different-uids
generate different UIDs for Birthday, Anniversary and Death event
Diffstat (limited to 'apps/dav/lib/CalDAV')
-rw-r--r-- | apps/dav/lib/CalDAV/BirthdayService.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/dav/lib/CalDAV/BirthdayService.php b/apps/dav/lib/CalDAV/BirthdayService.php index 62d218f0a2a..0f6e819bcc5 100644 --- a/apps/dav/lib/CalDAV/BirthdayService.php +++ b/apps/dav/lib/CalDAV/BirthdayService.php @@ -148,10 +148,11 @@ class BirthdayService { /** * @param string $cardData * @param string $dateField + * @param string $postfix * @param string $summarySymbol * @return null|VCalendar */ - public function buildDateFromContact($cardData, $dateField, $summarySymbol) { + public function buildDateFromContact($cardData, $dateField, $postfix, $summarySymbol) { if (empty($cardData)) { return null; } @@ -221,7 +222,7 @@ class BirthdayService { $date ); $vEvent->DTEND['VALUE'] = 'DATE'; - $vEvent->{'UID'} = $doc->UID; + $vEvent->{'UID'} = $doc->UID . $postfix; $vEvent->{'RRULE'} = 'FREQ=YEARLY'; $vEvent->{'SUMMARY'} = $summary; $vEvent->{'TRANSP'} = 'TRANSPARENT'; @@ -297,7 +298,7 @@ class BirthdayService { */ private function updateCalendar($cardUri, $cardData, $book, $calendarId, $type) { $objectUri = $book['uri'] . '-' . $cardUri . $type['postfix'] . '.ics'; - $calendarData = $this->buildDateFromContact($cardData, $type['field'], $type['symbol']); + $calendarData = $this->buildDateFromContact($cardData, $type['field'], $type['postfix'], $type['symbol']); $existing = $this->calDavBackEnd->getCalendarObject($calendarId, $objectUri); if (is_null($calendarData)) { if (!is_null($existing)) { |