summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CalDAV
diff options
context:
space:
mode:
authorSylvain <git@sylvain.dev>2022-10-02 18:21:29 +0200
committerSylvain <git@sylvain.dev>2022-10-02 18:30:13 +0200
commit5b8d8271a286e306c7adc42abaaf3fe2b2c48ca9 (patch)
tree92135b4e14fe55c2dfb832451288e138ea9e520f /apps/dav/lib/CalDAV
parente3d50f99c99e40f938462d92d724ad71dcbcfb51 (diff)
downloadnextcloud-server-5b8d8271a286e306c7adc42abaaf3fe2b2c48ca9.tar.gz
nextcloud-server-5b8d8271a286e306c7adc42abaaf3fe2b2c48ca9.zip
fix: define exclusion key as constant
Signed-off-by: Sylvain <git@sylvain.dev>
Diffstat (limited to 'apps/dav/lib/CalDAV')
-rw-r--r--apps/dav/lib/CalDAV/BirthdayService.php5
1 files changed, 3 insertions, 2 deletions
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;
}