Completed
Pull Request — master (#6840)
by Georg
34:18 queued 18:05
created
lib/public/Calendar/IManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
 	 * @return array an array of events/journals/todos which are arrays of arrays of key-value-pairs
68 68
 	 * @since 13.0.0
69 69
 	 */
70
-	public function search($pattern, array $searchProperties=[], array $options=[], $limit=null, $offset=null);
70
+	public function search($pattern, array $searchProperties = [], array $options = [], $limit = null, $offset = null);
71 71
 
72 72
 	/**
73 73
 	 * Check if calendars are available
Please login to merge, or discard this patch.
lib/public/Calendar/ICalendar.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 	 * @return array an array of events/journals/todos which are arrays of key-value-pairs
55 55
 	 * @since 13.0.0
56 56
 	 */
57
-	public function search($pattern, array $searchProperties=[], array $options=[], $limit=null, $offset=null);
57
+	public function search($pattern, array $searchProperties = [], array $options = [], $limit = null, $offset = null);
58 58
 
59 59
 	/**
60 60
 	 * @return integer build up using \OCP\Constants
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/CalendarManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
 	 * @param array $calendars
60 60
 	 */
61 61
 	private function register(IManager $cm, array $calendars) {
62
-		foreach($calendars as $calendarInfo) {
62
+		foreach ($calendars as $calendarInfo) {
63 63
 			$calendar = new Calendar($this->backend, $calendarInfo, $this->l10n);
64 64
 			$cm->registerCalendar(new CalendarImpl(
65 65
 				$calendar,
Please login to merge, or discard this patch.
lib/private/Calendar/Manager.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
 	/**
31 31
 	 * @var ICalendar[] holds all registered calendars
32 32
 	 */
33
-	private $calendars=[];
33
+	private $calendars = [];
34 34
 
35 35
 	/**
36 36
 	 * @var \Closure[] to call to load/register calendar providers
37 37
 	 */
38
-	private $calendarLoaders=[];
38
+	private $calendarLoaders = [];
39 39
 
40 40
 	/**
41 41
 	 * This function is used to search and find objects within the user's calendars.
@@ -50,12 +50,12 @@  discard block
 block discarded – undo
50 50
 	 * @return array an array of events/journals/todos which are arrays of arrays of key-value-pairs
51 51
 	 * @since 13.0.0
52 52
 	 */
53
-	public function search($pattern, array $searchProperties=[], array $options=[], $limit=null, $offset=null) {
53
+	public function search($pattern, array $searchProperties = [], array $options = [], $limit = null, $offset = null) {
54 54
 		$this->loadCalendars();
55 55
 		$result = [];
56
-		foreach($this->calendars as $calendar) {
56
+		foreach ($this->calendars as $calendar) {
57 57
 			$r = $calendar->search($pattern, $searchProperties, $options, $limit, $offset);
58
-			foreach($r as $o) {
58
+			foreach ($r as $o) {
59 59
 				$o['calendar-key'] = $calendar->getKey();
60 60
 				$result[] = $o;
61 61
 			}
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 	 * loads all calendars
133 133
 	 */
134 134
 	private function loadCalendars() {
135
-		foreach($this->calendarLoaders as $callable) {
135
+		foreach ($this->calendarLoaders as $callable) {
136 136
 			$callable($this);
137 137
 		}
138 138
 		$this->calendarLoaders = [];
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/CalendarImpl.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 * @return array an array of events/journals/todos which are arrays of key-value-pairs
88 88
 	 * @since 13.0.0
89 89
 	 */
90
-	public function search($pattern, array $searchProperties=[], array $options=[], $limit=null, $offset=null) {
90
+	public function search($pattern, array $searchProperties = [], array $options = [], $limit = null, $offset = null) {
91 91
 		return $this->backend->search($this->calendarInfo, $pattern,
92 92
 			$searchProperties, $options, $limit, $offset);
93 93
 	}
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 		$permissions = $this->calendar->getACL();
101 101
 		$result = 0;
102 102
 		foreach ($permissions as $permission) {
103
-			switch($permission['privilege']) {
103
+			switch ($permission['privilege']) {
104 104
 				case '{DAV:}read':
105 105
 					$result |= Constants::PERMISSION_READ;
106 106
 					break;
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/CalDavBackend.php 1 patch
Spacing   +127 added lines, -127 removed lines patch added patch discarded remove patch
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 			$query->andWhere($query->expr()->neq('uri', $query->createNamedParameter(BirthdayService::BIRTHDAY_CALENDAR_URI)));
209 209
 		}
210 210
 
211
-		return (int)$query->execute()->fetchColumn();
211
+		return (int) $query->execute()->fetchColumn();
212 212
 	}
213 213
 
214 214
 	/**
@@ -255,25 +255,25 @@  discard block
 block discarded – undo
255 255
 		$stmt = $query->execute();
256 256
 
257 257
 		$calendars = [];
258
-		while($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
258
+		while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
259 259
 
260 260
 			$components = [];
261 261
 			if ($row['components']) {
262
-				$components = explode(',',$row['components']);
262
+				$components = explode(',', $row['components']);
263 263
 			}
264 264
 
265 265
 			$calendar = [
266 266
 				'id' => $row['id'],
267 267
 				'uri' => $row['uri'],
268 268
 				'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
269
-				'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'),
270
-				'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
271
-				'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
272
-				'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
273
-				'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal' => $this->convertPrincipal($principalUri, !$this->legacyEndpoint),
269
+				'{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'),
270
+				'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0',
271
+				'{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
272
+				'{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'),
273
+				'{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}owner-principal' => $this->convertPrincipal($principalUri, !$this->legacyEndpoint),
274 274
 			];
275 275
 
276
-			foreach($this->propertyMap as $xmlName=>$dbName) {
276
+			foreach ($this->propertyMap as $xmlName=>$dbName) {
277 277
 				$calendar[$xmlName] = $row[$dbName];
278 278
 			}
279 279
 
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 		$principals = array_map(function($principal) {
292 292
 			return urldecode($principal);
293 293
 		}, $principals);
294
-		$principals[]= $principalUri;
294
+		$principals[] = $principalUri;
295 295
 
296 296
 		$fields = array_values($this->propertyMap);
297 297
 		$fields[] = 'a.id';
@@ -311,8 +311,8 @@  discard block
 block discarded – undo
311 311
 			->setParameter('principaluri', $principals, \Doctrine\DBAL\Connection::PARAM_STR_ARRAY)
312 312
 			->execute();
313 313
 
314
-		$readOnlyPropertyName = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}read-only';
315
-		while($row = $result->fetch()) {
314
+		$readOnlyPropertyName = '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}read-only';
315
+		while ($row = $result->fetch()) {
316 316
 			if ($row['principaluri'] === $principalUri) {
317 317
 				continue;
318 318
 			}
@@ -331,25 +331,25 @@  discard block
 block discarded – undo
331 331
 			}
332 332
 
333 333
 			list(, $name) = Uri\split($row['principaluri']);
334
-			$uri = $row['uri'] . '_shared_by_' . $name;
335
-			$row['displayname'] = $row['displayname'] . ' (' . $this->getUserDisplayName($name) . ')';
334
+			$uri = $row['uri'].'_shared_by_'.$name;
335
+			$row['displayname'] = $row['displayname'].' ('.$this->getUserDisplayName($name).')';
336 336
 			$components = [];
337 337
 			if ($row['components']) {
338
-				$components = explode(',',$row['components']);
338
+				$components = explode(',', $row['components']);
339 339
 			}
340 340
 			$calendar = [
341 341
 				'id' => $row['id'],
342 342
 				'uri' => $uri,
343 343
 				'principaluri' => $this->convertPrincipal($principalUri, !$this->legacyEndpoint),
344
-				'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'),
345
-				'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
346
-				'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
347
-				'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
348
-				'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
344
+				'{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'),
345
+				'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0',
346
+				'{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
347
+				'{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'),
348
+				'{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}owner-principal' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
349 349
 				$readOnlyPropertyName => $readOnly,
350 350
 			];
351 351
 
352
-			foreach($this->propertyMap as $xmlName=>$dbName) {
352
+			foreach ($this->propertyMap as $xmlName=>$dbName) {
353 353
 				$calendar[$xmlName] = $row[$dbName];
354 354
 			}
355 355
 
@@ -378,21 +378,21 @@  discard block
 block discarded – undo
378 378
 			->orderBy('calendarorder', 'ASC');
379 379
 		$stmt = $query->execute();
380 380
 		$calendars = [];
381
-		while($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
381
+		while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
382 382
 			$components = [];
383 383
 			if ($row['components']) {
384
-				$components = explode(',',$row['components']);
384
+				$components = explode(',', $row['components']);
385 385
 			}
386 386
 			$calendar = [
387 387
 				'id' => $row['id'],
388 388
 				'uri' => $row['uri'],
389 389
 				'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
390
-				'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'),
391
-				'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
392
-				'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
393
-				'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
390
+				'{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'),
391
+				'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0',
392
+				'{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
393
+				'{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'),
394 394
 			];
395
-			foreach($this->propertyMap as $xmlName=>$dbName) {
395
+			foreach ($this->propertyMap as $xmlName=>$dbName) {
396 396
 				$calendar[$xmlName] = $row[$dbName];
397 397
 			}
398 398
 
@@ -443,27 +443,27 @@  discard block
 block discarded – undo
443 443
 			->andWhere($query->expr()->eq('s.type', $query->createNamedParameter('calendar')))
444 444
 			->execute();
445 445
 
446
-		while($row = $result->fetch()) {
446
+		while ($row = $result->fetch()) {
447 447
 			list(, $name) = Uri\split($row['principaluri']);
448
-			$row['displayname'] = $row['displayname'] . "($name)";
448
+			$row['displayname'] = $row['displayname']."($name)";
449 449
 			$components = [];
450 450
 			if ($row['components']) {
451
-				$components = explode(',',$row['components']);
451
+				$components = explode(',', $row['components']);
452 452
 			}
453 453
 			$calendar = [
454 454
 				'id' => $row['id'],
455 455
 				'uri' => $row['publicuri'],
456 456
 				'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
457
-				'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'),
458
-				'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
459
-				'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
460
-				'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
461
-				'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal' => $this->convertPrincipal($row['principaluri'], $this->legacyEndpoint),
462
-				'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}read-only' => (int)$row['access'] === Backend::ACCESS_READ,
463
-				'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}public' => (int)$row['access'] === self::ACCESS_PUBLIC,
457
+				'{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'),
458
+				'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0',
459
+				'{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
460
+				'{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'),
461
+				'{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}owner-principal' => $this->convertPrincipal($row['principaluri'], $this->legacyEndpoint),
462
+				'{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}read-only' => (int) $row['access'] === Backend::ACCESS_READ,
463
+				'{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}public' => (int) $row['access'] === self::ACCESS_PUBLIC,
464 464
 			];
465 465
 
466
-			foreach($this->propertyMap as $xmlName=>$dbName) {
466
+			foreach ($this->propertyMap as $xmlName=>$dbName) {
467 467
 				$calendar[$xmlName] = $row[$dbName];
468 468
 			}
469 469
 
@@ -507,29 +507,29 @@  discard block
 block discarded – undo
507 507
 		$result->closeCursor();
508 508
 
509 509
 		if ($row === false) {
510
-			throw new NotFound('Node with name \'' . $uri . '\' could not be found');
510
+			throw new NotFound('Node with name \''.$uri.'\' could not be found');
511 511
 		}
512 512
 
513 513
 		list(, $name) = Uri\split($row['principaluri']);
514
-		$row['displayname'] = $row['displayname'] . ' ' . "($name)";
514
+		$row['displayname'] = $row['displayname'].' '."($name)";
515 515
 		$components = [];
516 516
 		if ($row['components']) {
517
-			$components = explode(',',$row['components']);
517
+			$components = explode(',', $row['components']);
518 518
 		}
519 519
 		$calendar = [
520 520
 			'id' => $row['id'],
521 521
 			'uri' => $row['publicuri'],
522 522
 			'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
523
-			'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'),
524
-			'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
525
-			'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
526
-			'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
527
-			'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
528
-			'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}read-only' => (int)$row['access'] === Backend::ACCESS_READ,
529
-			'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}public' => (int)$row['access'] === self::ACCESS_PUBLIC,
523
+			'{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'),
524
+			'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0',
525
+			'{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
526
+			'{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'),
527
+			'{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}owner-principal' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
528
+			'{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}read-only' => (int) $row['access'] === Backend::ACCESS_READ,
529
+			'{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}public' => (int) $row['access'] === self::ACCESS_PUBLIC,
530 530
 		];
531 531
 
532
-		foreach($this->propertyMap as $xmlName=>$dbName) {
532
+		foreach ($this->propertyMap as $xmlName=>$dbName) {
533 533
 			$calendar[$xmlName] = $row[$dbName];
534 534
 		}
535 535
 
@@ -569,20 +569,20 @@  discard block
 block discarded – undo
569 569
 
570 570
 		$components = [];
571 571
 		if ($row['components']) {
572
-			$components = explode(',',$row['components']);
572
+			$components = explode(',', $row['components']);
573 573
 		}
574 574
 
575 575
 		$calendar = [
576 576
 			'id' => $row['id'],
577 577
 			'uri' => $row['uri'],
578 578
 			'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
579
-			'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'),
580
-			'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
581
-			'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
582
-			'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
579
+			'{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'),
580
+			'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0',
581
+			'{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
582
+			'{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'),
583 583
 		];
584 584
 
585
-		foreach($this->propertyMap as $xmlName=>$dbName) {
585
+		foreach ($this->propertyMap as $xmlName=>$dbName) {
586 586
 			$calendar[$xmlName] = $row[$dbName];
587 587
 		}
588 588
 
@@ -615,20 +615,20 @@  discard block
 block discarded – undo
615 615
 
616 616
 		$components = [];
617 617
 		if ($row['components']) {
618
-			$components = explode(',',$row['components']);
618
+			$components = explode(',', $row['components']);
619 619
 		}
620 620
 
621 621
 		$calendar = [
622 622
 			'id' => $row['id'],
623 623
 			'uri' => $row['uri'],
624 624
 			'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
625
-			'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'),
626
-			'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
627
-			'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
628
-			'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
625
+			'{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'),
626
+			'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0',
627
+			'{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
628
+			'{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'),
629 629
 		];
630 630
 
631
-		foreach($this->propertyMap as $xmlName=>$dbName) {
631
+		foreach ($this->propertyMap as $xmlName=>$dbName) {
632 632
 			$calendar[$xmlName] = $row[$dbName];
633 633
 		}
634 634
 
@@ -663,16 +663,16 @@  discard block
 block discarded – undo
663 663
 		$sccs = '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set';
664 664
 		if (isset($properties[$sccs])) {
665 665
 			if (!($properties[$sccs] instanceof SupportedCalendarComponentSet)) {
666
-				throw new DAV\Exception('The ' . $sccs . ' property must be of type: \Sabre\CalDAV\Property\SupportedCalendarComponentSet');
666
+				throw new DAV\Exception('The '.$sccs.' property must be of type: \Sabre\CalDAV\Property\SupportedCalendarComponentSet');
667 667
 			}
668
-			$values['components'] = implode(',',$properties[$sccs]->getValue());
668
+			$values['components'] = implode(',', $properties[$sccs]->getValue());
669 669
 		}
670
-		$transp = '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp';
670
+		$transp = '{'.Plugin::NS_CALDAV.'}schedule-calendar-transp';
671 671
 		if (isset($properties[$transp])) {
672 672
 			$values['transparent'] = (int) ($properties[$transp]->getValue() === 'transparent');
673 673
 		}
674 674
 
675
-		foreach($this->propertyMap as $xmlName=>$dbName) {
675
+		foreach ($this->propertyMap as $xmlName=>$dbName) {
676 676
 			if (isset($properties[$xmlName])) {
677 677
 				$values[$dbName] = $properties[$xmlName];
678 678
 			}
@@ -680,7 +680,7 @@  discard block
 block discarded – undo
680 680
 
681 681
 		$query = $this->db->getQueryBuilder();
682 682
 		$query->insert('calendars');
683
-		foreach($values as $column => $value) {
683
+		foreach ($values as $column => $value) {
684 684
 			$query->setValue($column, $query->createNamedParameter($value));
685 685
 		}
686 686
 		$query->execute();
@@ -714,7 +714,7 @@  discard block
 block discarded – undo
714 714
 	 */
715 715
 	function updateCalendar($calendarId, PropPatch $propPatch) {
716 716
 		$supportedProperties = array_keys($this->propertyMap);
717
-		$supportedProperties[] = '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp';
717
+		$supportedProperties[] = '{'.Plugin::NS_CALDAV.'}schedule-calendar-transp';
718 718
 
719 719
 		/**
720 720
 		 * @suppress SqlInjectionChecker
@@ -724,7 +724,7 @@  discard block
 block discarded – undo
724 724
 			foreach ($mutations as $propertyName => $propertyValue) {
725 725
 
726 726
 				switch ($propertyName) {
727
-					case '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' :
727
+					case '{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' :
728 728
 						$fieldName = 'transparent';
729 729
 						$newValues[$fieldName] = (int) ($propertyValue->getValue() === 'transparent');
730 730
 						break;
@@ -839,16 +839,16 @@  discard block
 block discarded – undo
839 839
 		$stmt = $query->execute();
840 840
 
841 841
 		$result = [];
842
-		foreach($stmt->fetchAll(\PDO::FETCH_ASSOC) as $row) {
842
+		foreach ($stmt->fetchAll(\PDO::FETCH_ASSOC) as $row) {
843 843
 			$result[] = [
844 844
 					'id'           => $row['id'],
845 845
 					'uri'          => $row['uri'],
846 846
 					'lastmodified' => $row['lastmodified'],
847
-					'etag'         => '"' . $row['etag'] . '"',
847
+					'etag'         => '"'.$row['etag'].'"',
848 848
 					'calendarid'   => $row['calendarid'],
849
-					'size'         => (int)$row['size'],
849
+					'size'         => (int) $row['size'],
850 850
 					'component'    => strtolower($row['componenttype']),
851
-					'classification'=> (int)$row['classification']
851
+					'classification'=> (int) $row['classification']
852 852
 			];
853 853
 		}
854 854
 
@@ -881,18 +881,18 @@  discard block
 block discarded – undo
881 881
 		$stmt = $query->execute();
882 882
 		$row = $stmt->fetch(\PDO::FETCH_ASSOC);
883 883
 
884
-		if(!$row) return null;
884
+		if (!$row) return null;
885 885
 
886 886
 		return [
887 887
 				'id'            => $row['id'],
888 888
 				'uri'           => $row['uri'],
889 889
 				'lastmodified'  => $row['lastmodified'],
890
-				'etag'          => '"' . $row['etag'] . '"',
890
+				'etag'          => '"'.$row['etag'].'"',
891 891
 				'calendarid'    => $row['calendarid'],
892
-				'size'          => (int)$row['size'],
892
+				'size'          => (int) $row['size'],
893 893
 				'calendardata'  => $this->readBlob($row['calendardata']),
894 894
 				'component'     => strtolower($row['componenttype']),
895
-				'classification'=> (int)$row['classification']
895
+				'classification'=> (int) $row['classification']
896 896
 		];
897 897
 	}
898 898
 
@@ -931,12 +931,12 @@  discard block
 block discarded – undo
931 931
 					'id'           => $row['id'],
932 932
 					'uri'          => $row['uri'],
933 933
 					'lastmodified' => $row['lastmodified'],
934
-					'etag'         => '"' . $row['etag'] . '"',
934
+					'etag'         => '"'.$row['etag'].'"',
935 935
 					'calendarid'   => $row['calendarid'],
936
-					'size'         => (int)$row['size'],
936
+					'size'         => (int) $row['size'],
937 937
 					'calendardata' => $this->readBlob($row['calendardata']),
938 938
 					'component'    => strtolower($row['componenttype']),
939
-					'classification' => (int)$row['classification']
939
+					'classification' => (int) $row['classification']
940 940
 				];
941 941
 			}
942 942
 			$result->closeCursor();
@@ -1009,7 +1009,7 @@  discard block
 block discarded – undo
1009 1009
 		));
1010 1010
 		$this->addChange($calendarId, $objectUri, 1);
1011 1011
 
1012
-		return '"' . $extraData['etag'] . '"';
1012
+		return '"'.$extraData['etag'].'"';
1013 1013
 	}
1014 1014
 
1015 1015
 	/**
@@ -1064,7 +1064,7 @@  discard block
 block discarded – undo
1064 1064
 		}
1065 1065
 		$this->addChange($calendarId, $objectUri, 2);
1066 1066
 
1067
-		return '"' . $extraData['etag'] . '"';
1067
+		return '"'.$extraData['etag'].'"';
1068 1068
 	}
1069 1069
 
1070 1070
 	/**
@@ -1217,7 +1217,7 @@  discard block
 block discarded – undo
1217 1217
 		$stmt = $query->execute();
1218 1218
 
1219 1219
 		$result = [];
1220
-		while($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
1220
+		while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
1221 1221
 			if ($requirePostFilter) {
1222 1222
 				if (!$this->validateFilterForObject($row, $filters)) {
1223 1223
 					continue;
@@ -1238,14 +1238,14 @@  discard block
 block discarded – undo
1238 1238
 	 * @param integer|null $offset
1239 1239
 	 * @return array
1240 1240
 	 */
1241
-	public function calendarSearch($principalUri, array $filters, $limit=null, $offset=null) {
1241
+	public function calendarSearch($principalUri, array $filters, $limit = null, $offset = null) {
1242 1242
 		$calendars = $this->getCalendarsForUser($principalUri);
1243 1243
 		$ownCalendars = [];
1244 1244
 		$sharedCalendars = [];
1245 1245
 
1246 1246
 		$uriMapper = [];
1247 1247
 
1248
-		foreach($calendars as $calendar) {
1248
+		foreach ($calendars as $calendar) {
1249 1249
 			if ($calendar['{http://owncloud.org/ns}owner-principal'] === $principalUri) {
1250 1250
 				$ownCalendars[] = $calendar['id'];
1251 1251
 			} else {
@@ -1260,11 +1260,11 @@  discard block
 block discarded – undo
1260 1260
 		$query = $this->db->getQueryBuilder();
1261 1261
 		// Calendar id expressions
1262 1262
 		$calendarExpressions = [];
1263
-		foreach($ownCalendars as $id) {
1263
+		foreach ($ownCalendars as $id) {
1264 1264
 			$calendarExpressions[] = $query->expr()
1265 1265
 				->eq('c.calendarid', $query->createNamedParameter($id));
1266 1266
 		}
1267
-		foreach($sharedCalendars as $id) {
1267
+		foreach ($sharedCalendars as $id) {
1268 1268
 			$calendarExpressions[] = $query->expr()->andX(
1269 1269
 				$query->expr()->eq('c.calendarid',
1270 1270
 					$query->createNamedParameter($id)),
@@ -1281,7 +1281,7 @@  discard block
 block discarded – undo
1281 1281
 
1282 1282
 		// Component expressions
1283 1283
 		$compExpressions = [];
1284
-		foreach($filters['comps'] as $comp) {
1284
+		foreach ($filters['comps'] as $comp) {
1285 1285
 			$compExpressions[] = $query->expr()
1286 1286
 				->eq('c.componenttype', $query->createNamedParameter($comp));
1287 1287
 		}
@@ -1300,13 +1300,13 @@  discard block
 block discarded – undo
1300 1300
 		}
1301 1301
 
1302 1302
 		$propParamExpressions = [];
1303
-		foreach($filters['props'] as $prop) {
1303
+		foreach ($filters['props'] as $prop) {
1304 1304
 			$propParamExpressions[] = $query->expr()->andX(
1305 1305
 				$query->expr()->eq('i.name', $query->createNamedParameter($prop)),
1306 1306
 				$query->expr()->isNull('i.parameter')
1307 1307
 			);
1308 1308
 		}
1309
-		foreach($filters['params'] as $param) {
1309
+		foreach ($filters['params'] as $param) {
1310 1310
 			$propParamExpressions[] = $query->expr()->andX(
1311 1311
 				$query->expr()->eq('i.name', $query->createNamedParameter($param['property'])),
1312 1312
 				$query->expr()->eq('i.parameter', $query->createNamedParameter($param['parameter']))
@@ -1338,8 +1338,8 @@  discard block
 block discarded – undo
1338 1338
 		$stmt = $query->execute();
1339 1339
 
1340 1340
 		$result = [];
1341
-		while($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
1342
-			$path = $uriMapper[$row['calendarid']] . '/' . $row['uri'];
1341
+		while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
1342
+			$path = $uriMapper[$row['calendarid']].'/'.$row['uri'];
1343 1343
 			if (!in_array($path, $result)) {
1344 1344
 				$result[] = $path;
1345 1345
 			}
@@ -1377,7 +1377,7 @@  discard block
 block discarded – undo
1377 1377
 		}
1378 1378
 
1379 1379
 		$or = $innerQuery->expr()->orX();
1380
-		foreach($searchProperties as $searchProperty) {
1380
+		foreach ($searchProperties as $searchProperty) {
1381 1381
 			$or->add($innerQuery->expr()->eq('op.name',
1382 1382
 				$outerQuery->createNamedParameter($searchProperty)));
1383 1383
 		}
@@ -1387,8 +1387,8 @@  discard block
 block discarded – undo
1387 1387
 
1388 1388
 		if ($pattern !== '') {
1389 1389
 			$innerQuery->andWhere($innerQuery->expr()->iLike('op.value',
1390
-				$outerQuery->createNamedParameter('%' .
1391
-					$this->db->escapeLikeParameter($pattern) . '%')));
1390
+				$outerQuery->createNamedParameter('%'.
1391
+					$this->db->escapeLikeParameter($pattern).'%')));
1392 1392
 		}
1393 1393
 
1394 1394
 		$outerQuery->select('c.id', 'c.calendardata', 'c.componenttype', 'c.uid', 'c.uri')
@@ -1425,7 +1425,7 @@  discard block
 block discarded – undo
1425 1425
 			$comps = $calendarData->getComponents();
1426 1426
 			$objects = [];
1427 1427
 			$timezones = [];
1428
-			foreach($comps as $comp) {
1428
+			foreach ($comps as $comp) {
1429 1429
 				if ($comp instanceof VTimeZone) {
1430 1430
 					$timezones[] = $comp;
1431 1431
 				} else {
@@ -1462,7 +1462,7 @@  discard block
 block discarded – undo
1462 1462
 		});
1463 1463
 		$validationRules = $comp->getValidationRules();
1464 1464
 
1465
-		foreach($subComponents as $subComponent) {
1465
+		foreach ($subComponents as $subComponent) {
1466 1466
 			$name = $subComponent->name;
1467 1467
 			if (!isset($data[$name])) {
1468 1468
 				$data[$name] = [];
@@ -1470,7 +1470,7 @@  discard block
 block discarded – undo
1470 1470
 			$data[$name][] = $this->transformSearchData($subComponent);
1471 1471
 		}
1472 1472
 
1473
-		foreach($properties as $property) {
1473
+		foreach ($properties as $property) {
1474 1474
 			$name = $property->name;
1475 1475
 			if (!isset($validationRules[$name])) {
1476 1476
 				$validationRules[$name] = '*';
@@ -1540,7 +1540,7 @@  discard block
 block discarded – undo
1540 1540
 		$stmt = $query->execute();
1541 1541
 
1542 1542
 		if ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
1543
-			return $row['calendaruri'] . '/' . $row['objecturi'];
1543
+			return $row['calendaruri'].'/'.$row['objecturi'];
1544 1544
 		}
1545 1545
 
1546 1546
 		return null;
@@ -1605,7 +1605,7 @@  discard block
 block discarded – undo
1605 1605
 	function getChangesForCalendar($calendarId, $syncToken, $syncLevel, $limit = null) {
1606 1606
 		// Current synctoken
1607 1607
 		$stmt = $this->db->prepare('SELECT `synctoken` FROM `*PREFIX*calendars` WHERE `id` = ?');
1608
-		$stmt->execute([ $calendarId ]);
1608
+		$stmt->execute([$calendarId]);
1609 1609
 		$currentToken = $stmt->fetchColumn(0);
1610 1610
 
1611 1611
 		if (is_null($currentToken)) {
@@ -1622,8 +1622,8 @@  discard block
 block discarded – undo
1622 1622
 		if ($syncToken) {
1623 1623
 
1624 1624
 			$query = "SELECT `uri`, `operation` FROM `*PREFIX*calendarchanges` WHERE `synctoken` >= ? AND `synctoken` < ? AND `calendarid` = ? ORDER BY `synctoken`";
1625
-			if ($limit>0) {
1626
-				$query.= " LIMIT " . (int)$limit;
1625
+			if ($limit > 0) {
1626
+				$query .= " LIMIT ".(int) $limit;
1627 1627
 			}
1628 1628
 
1629 1629
 			// Fetching all changes
@@ -1634,15 +1634,15 @@  discard block
 block discarded – undo
1634 1634
 
1635 1635
 			// This loop ensures that any duplicates are overwritten, only the
1636 1636
 			// last change on a node is relevant.
1637
-			while($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
1637
+			while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
1638 1638
 
1639 1639
 				$changes[$row['uri']] = $row['operation'];
1640 1640
 
1641 1641
 			}
1642 1642
 
1643
-			foreach($changes as $uri => $operation) {
1643
+			foreach ($changes as $uri => $operation) {
1644 1644
 
1645
-				switch($operation) {
1645
+				switch ($operation) {
1646 1646
 					case 1 :
1647 1647
 						$result['added'][] = $uri;
1648 1648
 						break;
@@ -1712,10 +1712,10 @@  discard block
 block discarded – undo
1712 1712
 			->from('calendarsubscriptions')
1713 1713
 			->where($query->expr()->eq('principaluri', $query->createNamedParameter($principalUri)))
1714 1714
 			->orderBy('calendarorder', 'asc');
1715
-		$stmt =$query->execute();
1715
+		$stmt = $query->execute();
1716 1716
 
1717 1717
 		$subscriptions = [];
1718
-		while($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
1718
+		while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
1719 1719
 
1720 1720
 			$subscription = [
1721 1721
 				'id'           => $row['id'],
@@ -1724,10 +1724,10 @@  discard block
 block discarded – undo
1724 1724
 				'source'       => $row['source'],
1725 1725
 				'lastmodified' => $row['lastmodified'],
1726 1726
 
1727
-				'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet(['VTODO', 'VEVENT']),
1727
+				'{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet(['VTODO', 'VEVENT']),
1728 1728
 			];
1729 1729
 
1730
-			foreach($this->subscriptionPropertyMap as $xmlName=>$dbName) {
1730
+			foreach ($this->subscriptionPropertyMap as $xmlName=>$dbName) {
1731 1731
 				if (!is_null($row[$dbName])) {
1732 1732
 					$subscription[$xmlName] = $row[$dbName];
1733 1733
 				}
@@ -1766,7 +1766,7 @@  discard block
 block discarded – undo
1766 1766
 
1767 1767
 		$propertiesBoolean = ['striptodos', 'stripalarms', 'stripattachments'];
1768 1768
 
1769
-		foreach($this->subscriptionPropertyMap as $xmlName=>$dbName) {
1769
+		foreach ($this->subscriptionPropertyMap as $xmlName=>$dbName) {
1770 1770
 			if (array_key_exists($xmlName, $properties)) {
1771 1771
 					$values[$dbName] = $properties[$xmlName];
1772 1772
 					if (in_array($dbName, $propertiesBoolean)) {
@@ -1817,7 +1817,7 @@  discard block
 block discarded – undo
1817 1817
 
1818 1818
 			$newValues = [];
1819 1819
 
1820
-			foreach($mutations as $propertyName=>$propertyValue) {
1820
+			foreach ($mutations as $propertyName=>$propertyValue) {
1821 1821
 				if ($propertyName === '{http://calendarserver.org/ns/}source') {
1822 1822
 					$newValues['source'] = $propertyValue->getHref();
1823 1823
 				} else {
@@ -1829,7 +1829,7 @@  discard block
 block discarded – undo
1829 1829
 			$query = $this->db->getQueryBuilder();
1830 1830
 			$query->update('calendarsubscriptions')
1831 1831
 				->set('lastmodified', $query->createNamedParameter(time()));
1832
-			foreach($newValues as $fieldName=>$value) {
1832
+			foreach ($newValues as $fieldName=>$value) {
1833 1833
 				$query->set($fieldName, $query->createNamedParameter($value));
1834 1834
 			}
1835 1835
 			$query->where($query->expr()->eq('id', $query->createNamedParameter($subscriptionId)))
@@ -1879,7 +1879,7 @@  discard block
 block discarded – undo
1879 1879
 
1880 1880
 		$row = $stmt->fetch(\PDO::FETCH_ASSOC);
1881 1881
 
1882
-		if(!$row) {
1882
+		if (!$row) {
1883 1883
 			return null;
1884 1884
 		}
1885 1885
 
@@ -1887,8 +1887,8 @@  discard block
 block discarded – undo
1887 1887
 				'uri'          => $row['uri'],
1888 1888
 				'calendardata' => $row['calendardata'],
1889 1889
 				'lastmodified' => $row['lastmodified'],
1890
-				'etag'         => '"' . $row['etag'] . '"',
1891
-				'size'         => (int)$row['size'],
1890
+				'etag'         => '"'.$row['etag'].'"',
1891
+				'size'         => (int) $row['size'],
1892 1892
 		];
1893 1893
 	}
1894 1894
 
@@ -1911,13 +1911,13 @@  discard block
 block discarded – undo
1911 1911
 				->execute();
1912 1912
 
1913 1913
 		$result = [];
1914
-		foreach($stmt->fetchAll(\PDO::FETCH_ASSOC) as $row) {
1914
+		foreach ($stmt->fetchAll(\PDO::FETCH_ASSOC) as $row) {
1915 1915
 			$result[] = [
1916 1916
 					'calendardata' => $row['calendardata'],
1917 1917
 					'uri'          => $row['uri'],
1918 1918
 					'lastmodified' => $row['lastmodified'],
1919
-					'etag'         => '"' . $row['etag'] . '"',
1920
-					'size'         => (int)$row['size'],
1919
+					'etag'         => '"'.$row['etag'].'"',
1920
+					'size'         => (int) $row['size'],
1921 1921
 			];
1922 1922
 		}
1923 1923
 
@@ -2009,10 +2009,10 @@  discard block
 block discarded – undo
2009 2009
 		$lastOccurrence = null;
2010 2010
 		$uid = null;
2011 2011
 		$classification = self::CLASSIFICATION_PUBLIC;
2012
-		foreach($vObject->getComponents() as $component) {
2013
-			if ($component->name!=='VTIMEZONE') {
2012
+		foreach ($vObject->getComponents() as $component) {
2013
+			if ($component->name !== 'VTIMEZONE') {
2014 2014
 				$componentType = $component->name;
2015
-				$uid = (string)$component->UID;
2015
+				$uid = (string) $component->UID;
2016 2016
 				break;
2017 2017
 			}
2018 2018
 		}
@@ -2037,13 +2037,13 @@  discard block
 block discarded – undo
2037 2037
 					$lastOccurrence = $firstOccurrence;
2038 2038
 				}
2039 2039
 			} else {
2040
-				$it = new EventIterator($vObject, (string)$component->UID);
2040
+				$it = new EventIterator($vObject, (string) $component->UID);
2041 2041
 				$maxDate = new \DateTime(self::MAX_DATE);
2042 2042
 				if ($it->isInfinite()) {
2043 2043
 					$lastOccurrence = $maxDate->getTimestamp();
2044 2044
 				} else {
2045 2045
 					$end = $it->getDtEnd();
2046
-					while($it->valid() && $end < $maxDate) {
2046
+					while ($it->valid() && $end < $maxDate) {
2047 2047
 						$end = $it->getDtEnd();
2048 2048
 						$it->next();
2049 2049
 
@@ -2283,10 +2283,10 @@  discard block
 block discarded – undo
2283 2283
 		$result->closeCursor();
2284 2284
 
2285 2285
 		if (!isset($objectIds['id'])) {
2286
-			throw new \InvalidArgumentException('Calendarobject does not exists: ' . $uri);
2286
+			throw new \InvalidArgumentException('Calendarobject does not exists: '.$uri);
2287 2287
 		}
2288 2288
 
2289
-		return (int)$objectIds['id'];
2289
+		return (int) $objectIds['id'];
2290 2290
 	}
2291 2291
 
2292 2292
 	private function convertPrincipal($principalUri, $toV2) {
@@ -2301,8 +2301,8 @@  discard block
 block discarded – undo
2301 2301
 	}
2302 2302
 
2303 2303
 	private function addOwnerPrincipal(&$calendarInfo) {
2304
-		$ownerPrincipalKey = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal';
2305
-		$displaynameKey = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD . '}owner-displayname';
2304
+		$ownerPrincipalKey = '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}owner-principal';
2305
+		$displaynameKey = '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD.'}owner-displayname';
2306 2306
 		if (isset($calendarInfo[$ownerPrincipalKey])) {
2307 2307
 			$uri = $calendarInfo[$ownerPrincipalKey];
2308 2308
 		} else {
Please login to merge, or discard this patch.