From 5b8d8271a286e306c7adc42abaaf3fe2b2c48ca9 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Sun, 2 Oct 2022 18:21:29 +0200 Subject: fix: define exclusion key as constant Signed-off-by: Sylvain --- apps/dav/lib/CalDAV/BirthdayService.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'apps/dav/lib/CalDAV') diff --git a/apps/dav/lib/CalDAV/BirthdayService.php b/apps/dav/lib/CalDAV/BirthdayService.php index e0fcc666e3f..df351a47552 100644 --- a/apps/dav/lib/CalDAV/BirthdayService.php +++ b/apps/dav/lib/CalDAV/BirthdayService.php @@ -54,6 +54,8 @@ use Sabre\VObject\Reader; */ class BirthdayService { public const BIRTHDAY_CALENDAR_URI = 'contact_birthdays'; + public const EXCLUDE_FROM_BIRTHDAY_CALENDAR_PROPERTY_NAME = 'X-NC-EXCLUDE-FROM-BIRTHDAY-CALENDAR'; + private GroupPrincipalBackend $principalBackend; private CalDavBackend $calDavBackEnd; private CardDavBackend $cardDavBackEnd; @@ -180,8 +182,7 @@ class BirthdayService { return null; } - $excludeFromBirthdayCalendarKey = "x-nc-exclude-from-birthday-calendar"; - if (isset($doc->{$excludeFromBirthdayCalendarKey})) { + if (isset($doc->{self::EXCLUDE_FROM_BIRTHDAY_CALENDAR_PROPERTY_NAME})) { return null; } -- cgit v1.2.3