@@ -39,7 +39,7 @@ |
||
39 | 39 | $reader->parseInnerTree(); |
40 | 40 | |
41 | 41 | if (!is_string($componentName)) { |
42 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}comp-filter requires a valid name attribute'); |
|
42 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}comp-filter requires a valid name attribute'); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | return $componentName; |
@@ -35,7 +35,7 @@ |
||
35 | 35 | static function xmlDeserialize(Reader $reader) { |
36 | 36 | $value = $reader->parseInnerTree(); |
37 | 37 | if (!is_int($value) && !is_string($value)) { |
38 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}limit has illegal value'); |
|
38 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}limit has illegal value'); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | return intval($value); |
@@ -35,7 +35,7 @@ |
||
35 | 35 | static function xmlDeserialize(Reader $reader) { |
36 | 36 | $value = $reader->parseInnerTree(); |
37 | 37 | if (!is_string($value)) { |
38 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}search-term has illegal value'); |
|
38 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}search-term has illegal value'); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | return $value; |
@@ -35,7 +35,7 @@ |
||
35 | 35 | static function xmlDeserialize(Reader $reader) { |
36 | 36 | $value = $reader->parseInnerTree(); |
37 | 37 | if (!is_int($value) && !is_string($value)) { |
38 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}offset has illegal value'); |
|
38 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}offset has illegal value'); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | return intval($value); |
@@ -39,7 +39,7 @@ |
||
39 | 39 | $reader->parseInnerTree(); |
40 | 40 | |
41 | 41 | if (!is_string($componentName)) { |
42 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}prop-filter requires a valid name attribute'); |
|
42 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}prop-filter requires a valid name attribute'); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | return $componentName; |
@@ -40,11 +40,11 @@ |
||
40 | 40 | $reader->parseInnerTree(); |
41 | 41 | |
42 | 42 | if (!is_string($property)) { |
43 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}param-filter requires a valid property attribute'); |
|
43 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}param-filter requires a valid property attribute'); |
|
44 | 44 | |
45 | 45 | } |
46 | 46 | if (!is_string($parameter)) { |
47 | - throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}param-filter requires a valid parameter attribute'); |
|
47 | + throw new BadRequest('The {'.SearchPlugin::NS_Nextcloud.'}param-filter requires a valid parameter attribute'); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | return [ |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | |
110 | 110 | } |
111 | 111 | |
112 | - throw new NotFound('Node with name \'' . $name . '\' could not be found'); |
|
112 | + throw new NotFound('Node with name \''.$name.'\' could not be found'); |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | /** |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * @param integer|null $limit |
118 | 118 | * @param integer|null $offset |
119 | 119 | */ |
120 | - function calendarSearch(array $filters, $limit=null, $offset=null) { |
|
120 | + function calendarSearch(array $filters, $limit = null, $offset = null) { |
|
121 | 121 | $principalUri = $this->principalInfo['uri']; |
122 | 122 | return $this->caldavBackend->calendarSearch($principalUri, $filters, $limit, $offset); |
123 | 123 | } |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | $query->andWhere($query->expr()->neq('uri', $query->createNamedParameter(BirthdayService::BIRTHDAY_CALENDAR_URI))); |
195 | 195 | } |
196 | 196 | |
197 | - return (int)$query->execute()->fetchColumn(); |
|
197 | + return (int) $query->execute()->fetchColumn(); |
|
198 | 198 | } |
199 | 199 | |
200 | 200 | /** |
@@ -241,25 +241,25 @@ discard block |
||
241 | 241 | $stmt = $query->execute(); |
242 | 242 | |
243 | 243 | $calendars = []; |
244 | - while($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
244 | + while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
245 | 245 | |
246 | 246 | $components = []; |
247 | 247 | if ($row['components']) { |
248 | - $components = explode(',',$row['components']); |
|
248 | + $components = explode(',', $row['components']); |
|
249 | 249 | } |
250 | 250 | |
251 | 251 | $calendar = [ |
252 | 252 | 'id' => $row['id'], |
253 | 253 | 'uri' => $row['uri'], |
254 | 254 | 'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint), |
255 | - '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'), |
|
256 | - '{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0', |
|
257 | - '{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), |
|
258 | - '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'), |
|
259 | - '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal' => $this->convertPrincipal($principalUri, !$this->legacyEndpoint), |
|
255 | + '{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'), |
|
256 | + '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0', |
|
257 | + '{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), |
|
258 | + '{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'), |
|
259 | + '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}owner-principal' => $this->convertPrincipal($principalUri, !$this->legacyEndpoint), |
|
260 | 260 | ]; |
261 | 261 | |
262 | - foreach($this->propertyMap as $xmlName=>$dbName) { |
|
262 | + foreach ($this->propertyMap as $xmlName=>$dbName) { |
|
263 | 263 | $calendar[$xmlName] = $row[$dbName]; |
264 | 264 | } |
265 | 265 | |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | |
275 | 275 | // query for shared calendars |
276 | 276 | $principals = $this->principalBackend->getGroupMembership($principalUriOriginal, true); |
277 | - $principals[]= $principalUri; |
|
277 | + $principals[] = $principalUri; |
|
278 | 278 | |
279 | 279 | $fields = array_values($this->propertyMap); |
280 | 280 | $fields[] = 'a.id'; |
@@ -294,8 +294,8 @@ discard block |
||
294 | 294 | ->setParameter('principaluri', $principals, \Doctrine\DBAL\Connection::PARAM_STR_ARRAY) |
295 | 295 | ->execute(); |
296 | 296 | |
297 | - $readOnlyPropertyName = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}read-only'; |
|
298 | - while($row = $result->fetch()) { |
|
297 | + $readOnlyPropertyName = '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}read-only'; |
|
298 | + while ($row = $result->fetch()) { |
|
299 | 299 | if ($row['principaluri'] === $principalUri) { |
300 | 300 | continue; |
301 | 301 | } |
@@ -314,25 +314,25 @@ discard block |
||
314 | 314 | } |
315 | 315 | |
316 | 316 | list(, $name) = URLUtil::splitPath($row['principaluri']); |
317 | - $uri = $row['uri'] . '_shared_by_' . $name; |
|
318 | - $row['displayname'] = $row['displayname'] . ' (' . $this->getUserDisplayName($name) . ')'; |
|
317 | + $uri = $row['uri'].'_shared_by_'.$name; |
|
318 | + $row['displayname'] = $row['displayname'].' ('.$this->getUserDisplayName($name).')'; |
|
319 | 319 | $components = []; |
320 | 320 | if ($row['components']) { |
321 | - $components = explode(',',$row['components']); |
|
321 | + $components = explode(',', $row['components']); |
|
322 | 322 | } |
323 | 323 | $calendar = [ |
324 | 324 | 'id' => $row['id'], |
325 | 325 | 'uri' => $uri, |
326 | 326 | 'principaluri' => $this->convertPrincipal($principalUri, !$this->legacyEndpoint), |
327 | - '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'), |
|
328 | - '{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0', |
|
329 | - '{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), |
|
330 | - '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'), |
|
331 | - '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint), |
|
327 | + '{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'), |
|
328 | + '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0', |
|
329 | + '{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), |
|
330 | + '{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'), |
|
331 | + '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}owner-principal' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint), |
|
332 | 332 | $readOnlyPropertyName => $readOnly, |
333 | 333 | ]; |
334 | 334 | |
335 | - foreach($this->propertyMap as $xmlName=>$dbName) { |
|
335 | + foreach ($this->propertyMap as $xmlName=>$dbName) { |
|
336 | 336 | $calendar[$xmlName] = $row[$dbName]; |
337 | 337 | } |
338 | 338 | |
@@ -361,21 +361,21 @@ discard block |
||
361 | 361 | ->orderBy('calendarorder', 'ASC'); |
362 | 362 | $stmt = $query->execute(); |
363 | 363 | $calendars = []; |
364 | - while($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
364 | + while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
365 | 365 | $components = []; |
366 | 366 | if ($row['components']) { |
367 | - $components = explode(',',$row['components']); |
|
367 | + $components = explode(',', $row['components']); |
|
368 | 368 | } |
369 | 369 | $calendar = [ |
370 | 370 | 'id' => $row['id'], |
371 | 371 | 'uri' => $row['uri'], |
372 | 372 | 'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint), |
373 | - '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'), |
|
374 | - '{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0', |
|
375 | - '{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), |
|
376 | - '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'), |
|
373 | + '{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'), |
|
374 | + '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0', |
|
375 | + '{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), |
|
376 | + '{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'), |
|
377 | 377 | ]; |
378 | - foreach($this->propertyMap as $xmlName=>$dbName) { |
|
378 | + foreach ($this->propertyMap as $xmlName=>$dbName) { |
|
379 | 379 | $calendar[$xmlName] = $row[$dbName]; |
380 | 380 | } |
381 | 381 | |
@@ -426,27 +426,27 @@ discard block |
||
426 | 426 | ->andWhere($query->expr()->eq('s.type', $query->createNamedParameter('calendar'))) |
427 | 427 | ->execute(); |
428 | 428 | |
429 | - while($row = $result->fetch()) { |
|
429 | + while ($row = $result->fetch()) { |
|
430 | 430 | list(, $name) = URLUtil::splitPath($row['principaluri']); |
431 | - $row['displayname'] = $row['displayname'] . "($name)"; |
|
431 | + $row['displayname'] = $row['displayname']."($name)"; |
|
432 | 432 | $components = []; |
433 | 433 | if ($row['components']) { |
434 | - $components = explode(',',$row['components']); |
|
434 | + $components = explode(',', $row['components']); |
|
435 | 435 | } |
436 | 436 | $calendar = [ |
437 | 437 | 'id' => $row['id'], |
438 | 438 | 'uri' => $row['publicuri'], |
439 | 439 | 'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint), |
440 | - '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'), |
|
441 | - '{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0', |
|
442 | - '{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), |
|
443 | - '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'), |
|
444 | - '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal' => $this->convertPrincipal($row['principaluri'], $this->legacyEndpoint), |
|
445 | - '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}read-only' => (int)$row['access'] === Backend::ACCESS_READ, |
|
446 | - '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}public' => (int)$row['access'] === self::ACCESS_PUBLIC, |
|
440 | + '{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'), |
|
441 | + '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0', |
|
442 | + '{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), |
|
443 | + '{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'), |
|
444 | + '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}owner-principal' => $this->convertPrincipal($row['principaluri'], $this->legacyEndpoint), |
|
445 | + '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}read-only' => (int) $row['access'] === Backend::ACCESS_READ, |
|
446 | + '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}public' => (int) $row['access'] === self::ACCESS_PUBLIC, |
|
447 | 447 | ]; |
448 | 448 | |
449 | - foreach($this->propertyMap as $xmlName=>$dbName) { |
|
449 | + foreach ($this->propertyMap as $xmlName=>$dbName) { |
|
450 | 450 | $calendar[$xmlName] = $row[$dbName]; |
451 | 451 | } |
452 | 452 | |
@@ -490,29 +490,29 @@ discard block |
||
490 | 490 | $result->closeCursor(); |
491 | 491 | |
492 | 492 | if ($row === false) { |
493 | - throw new NotFound('Node with name \'' . $uri . '\' could not be found'); |
|
493 | + throw new NotFound('Node with name \''.$uri.'\' could not be found'); |
|
494 | 494 | } |
495 | 495 | |
496 | 496 | list(, $name) = URLUtil::splitPath($row['principaluri']); |
497 | - $row['displayname'] = $row['displayname'] . ' ' . "($name)"; |
|
497 | + $row['displayname'] = $row['displayname'].' '."($name)"; |
|
498 | 498 | $components = []; |
499 | 499 | if ($row['components']) { |
500 | - $components = explode(',',$row['components']); |
|
500 | + $components = explode(',', $row['components']); |
|
501 | 501 | } |
502 | 502 | $calendar = [ |
503 | 503 | 'id' => $row['id'], |
504 | 504 | 'uri' => $row['publicuri'], |
505 | 505 | 'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint), |
506 | - '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'), |
|
507 | - '{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0', |
|
508 | - '{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), |
|
509 | - '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'), |
|
510 | - '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint), |
|
511 | - '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}read-only' => (int)$row['access'] === Backend::ACCESS_READ, |
|
512 | - '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}public' => (int)$row['access'] === self::ACCESS_PUBLIC, |
|
506 | + '{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'), |
|
507 | + '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0', |
|
508 | + '{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), |
|
509 | + '{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'), |
|
510 | + '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}owner-principal' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint), |
|
511 | + '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}read-only' => (int) $row['access'] === Backend::ACCESS_READ, |
|
512 | + '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}public' => (int) $row['access'] === self::ACCESS_PUBLIC, |
|
513 | 513 | ]; |
514 | 514 | |
515 | - foreach($this->propertyMap as $xmlName=>$dbName) { |
|
515 | + foreach ($this->propertyMap as $xmlName=>$dbName) { |
|
516 | 516 | $calendar[$xmlName] = $row[$dbName]; |
517 | 517 | } |
518 | 518 | |
@@ -552,20 +552,20 @@ discard block |
||
552 | 552 | |
553 | 553 | $components = []; |
554 | 554 | if ($row['components']) { |
555 | - $components = explode(',',$row['components']); |
|
555 | + $components = explode(',', $row['components']); |
|
556 | 556 | } |
557 | 557 | |
558 | 558 | $calendar = [ |
559 | 559 | 'id' => $row['id'], |
560 | 560 | 'uri' => $row['uri'], |
561 | 561 | 'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint), |
562 | - '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'), |
|
563 | - '{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0', |
|
564 | - '{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), |
|
565 | - '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'), |
|
562 | + '{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'), |
|
563 | + '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0', |
|
564 | + '{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), |
|
565 | + '{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'), |
|
566 | 566 | ]; |
567 | 567 | |
568 | - foreach($this->propertyMap as $xmlName=>$dbName) { |
|
568 | + foreach ($this->propertyMap as $xmlName=>$dbName) { |
|
569 | 569 | $calendar[$xmlName] = $row[$dbName]; |
570 | 570 | } |
571 | 571 | |
@@ -598,20 +598,20 @@ discard block |
||
598 | 598 | |
599 | 599 | $components = []; |
600 | 600 | if ($row['components']) { |
601 | - $components = explode(',',$row['components']); |
|
601 | + $components = explode(',', $row['components']); |
|
602 | 602 | } |
603 | 603 | |
604 | 604 | $calendar = [ |
605 | 605 | 'id' => $row['id'], |
606 | 606 | 'uri' => $row['uri'], |
607 | 607 | 'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint), |
608 | - '{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'), |
|
609 | - '{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0', |
|
610 | - '{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), |
|
611 | - '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'), |
|
608 | + '{'.Plugin::NS_CALENDARSERVER.'}getctag' => 'http://sabre.io/ns/sync/'.($row['synctoken'] ? $row['synctoken'] : '0'), |
|
609 | + '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ? $row['synctoken'] : '0', |
|
610 | + '{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet($components), |
|
611 | + '{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent'] ? 'transparent' : 'opaque'), |
|
612 | 612 | ]; |
613 | 613 | |
614 | - foreach($this->propertyMap as $xmlName=>$dbName) { |
|
614 | + foreach ($this->propertyMap as $xmlName=>$dbName) { |
|
615 | 615 | $calendar[$xmlName] = $row[$dbName]; |
616 | 616 | } |
617 | 617 | |
@@ -645,16 +645,16 @@ discard block |
||
645 | 645 | $sccs = '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set'; |
646 | 646 | if (isset($properties[$sccs])) { |
647 | 647 | if (!($properties[$sccs] instanceof SupportedCalendarComponentSet)) { |
648 | - throw new DAV\Exception('The ' . $sccs . ' property must be of type: \Sabre\CalDAV\Property\SupportedCalendarComponentSet'); |
|
648 | + throw new DAV\Exception('The '.$sccs.' property must be of type: \Sabre\CalDAV\Property\SupportedCalendarComponentSet'); |
|
649 | 649 | } |
650 | - $values['components'] = implode(',',$properties[$sccs]->getValue()); |
|
650 | + $values['components'] = implode(',', $properties[$sccs]->getValue()); |
|
651 | 651 | } |
652 | - $transp = '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp'; |
|
652 | + $transp = '{'.Plugin::NS_CALDAV.'}schedule-calendar-transp'; |
|
653 | 653 | if (isset($properties[$transp])) { |
654 | 654 | $values['transparent'] = (int) ($properties[$transp]->getValue() === 'transparent'); |
655 | 655 | } |
656 | 656 | |
657 | - foreach($this->propertyMap as $xmlName=>$dbName) { |
|
657 | + foreach ($this->propertyMap as $xmlName=>$dbName) { |
|
658 | 658 | if (isset($properties[$xmlName])) { |
659 | 659 | $values[$dbName] = $properties[$xmlName]; |
660 | 660 | } |
@@ -662,7 +662,7 @@ discard block |
||
662 | 662 | |
663 | 663 | $query = $this->db->getQueryBuilder(); |
664 | 664 | $query->insert('calendars'); |
665 | - foreach($values as $column => $value) { |
|
665 | + foreach ($values as $column => $value) { |
|
666 | 666 | $query->setValue($column, $query->createNamedParameter($value)); |
667 | 667 | } |
668 | 668 | $query->execute(); |
@@ -695,14 +695,14 @@ discard block |
||
695 | 695 | */ |
696 | 696 | function updateCalendar($calendarId, PropPatch $propPatch) { |
697 | 697 | $supportedProperties = array_keys($this->propertyMap); |
698 | - $supportedProperties[] = '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp'; |
|
698 | + $supportedProperties[] = '{'.Plugin::NS_CALDAV.'}schedule-calendar-transp'; |
|
699 | 699 | |
700 | 700 | $propPatch->handle($supportedProperties, function($mutations) use ($calendarId) { |
701 | 701 | $newValues = []; |
702 | 702 | foreach ($mutations as $propertyName => $propertyValue) { |
703 | 703 | |
704 | 704 | switch ($propertyName) { |
705 | - case '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' : |
|
705 | + case '{'.Plugin::NS_CALDAV.'}schedule-calendar-transp' : |
|
706 | 706 | $fieldName = 'transparent'; |
707 | 707 | $newValues[$fieldName] = (int) ($propertyValue->getValue() === 'transparent'); |
708 | 708 | break; |
@@ -817,16 +817,16 @@ discard block |
||
817 | 817 | $stmt = $query->execute(); |
818 | 818 | |
819 | 819 | $result = []; |
820 | - foreach($stmt->fetchAll(\PDO::FETCH_ASSOC) as $row) { |
|
820 | + foreach ($stmt->fetchAll(\PDO::FETCH_ASSOC) as $row) { |
|
821 | 821 | $result[] = [ |
822 | 822 | 'id' => $row['id'], |
823 | 823 | 'uri' => $row['uri'], |
824 | 824 | 'lastmodified' => $row['lastmodified'], |
825 | - 'etag' => '"' . $row['etag'] . '"', |
|
825 | + 'etag' => '"'.$row['etag'].'"', |
|
826 | 826 | 'calendarid' => $row['calendarid'], |
827 | - 'size' => (int)$row['size'], |
|
827 | + 'size' => (int) $row['size'], |
|
828 | 828 | 'component' => strtolower($row['componenttype']), |
829 | - 'classification'=> (int)$row['classification'] |
|
829 | + 'classification'=> (int) $row['classification'] |
|
830 | 830 | ]; |
831 | 831 | } |
832 | 832 | |
@@ -859,18 +859,18 @@ discard block |
||
859 | 859 | $stmt = $query->execute(); |
860 | 860 | $row = $stmt->fetch(\PDO::FETCH_ASSOC); |
861 | 861 | |
862 | - if(!$row) return null; |
|
862 | + if (!$row) return null; |
|
863 | 863 | |
864 | 864 | return [ |
865 | 865 | 'id' => $row['id'], |
866 | 866 | 'uri' => $row['uri'], |
867 | 867 | 'lastmodified' => $row['lastmodified'], |
868 | - 'etag' => '"' . $row['etag'] . '"', |
|
868 | + 'etag' => '"'.$row['etag'].'"', |
|
869 | 869 | 'calendarid' => $row['calendarid'], |
870 | - 'size' => (int)$row['size'], |
|
870 | + 'size' => (int) $row['size'], |
|
871 | 871 | 'calendardata' => $this->readBlob($row['calendardata']), |
872 | 872 | 'component' => strtolower($row['componenttype']), |
873 | - 'classification'=> (int)$row['classification'] |
|
873 | + 'classification'=> (int) $row['classification'] |
|
874 | 874 | ]; |
875 | 875 | } |
876 | 876 | |
@@ -909,12 +909,12 @@ discard block |
||
909 | 909 | 'id' => $row['id'], |
910 | 910 | 'uri' => $row['uri'], |
911 | 911 | 'lastmodified' => $row['lastmodified'], |
912 | - 'etag' => '"' . $row['etag'] . '"', |
|
912 | + 'etag' => '"'.$row['etag'].'"', |
|
913 | 913 | 'calendarid' => $row['calendarid'], |
914 | - 'size' => (int)$row['size'], |
|
914 | + 'size' => (int) $row['size'], |
|
915 | 915 | 'calendardata' => $this->readBlob($row['calendardata']), |
916 | 916 | 'component' => strtolower($row['componenttype']), |
917 | - 'classification' => (int)$row['classification'] |
|
917 | + 'classification' => (int) $row['classification'] |
|
918 | 918 | ]; |
919 | 919 | } |
920 | 920 | $result->closeCursor(); |
@@ -973,7 +973,7 @@ discard block |
||
973 | 973 | )); |
974 | 974 | $this->addChange($calendarId, $objectUri, 1); |
975 | 975 | |
976 | - return '"' . $extraData['etag'] . '"'; |
|
976 | + return '"'.$extraData['etag'].'"'; |
|
977 | 977 | } |
978 | 978 | |
979 | 979 | /** |
@@ -1028,7 +1028,7 @@ discard block |
||
1028 | 1028 | } |
1029 | 1029 | $this->addChange($calendarId, $objectUri, 2); |
1030 | 1030 | |
1031 | - return '"' . $extraData['etag'] . '"'; |
|
1031 | + return '"'.$extraData['etag'].'"'; |
|
1032 | 1032 | } |
1033 | 1033 | |
1034 | 1034 | /** |
@@ -1181,7 +1181,7 @@ discard block |
||
1181 | 1181 | $stmt = $query->execute(); |
1182 | 1182 | |
1183 | 1183 | $result = []; |
1184 | - while($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
1184 | + while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
1185 | 1185 | if ($requirePostFilter) { |
1186 | 1186 | if (!$this->validateFilterForObject($row, $filters)) { |
1187 | 1187 | continue; |
@@ -1202,14 +1202,14 @@ discard block |
||
1202 | 1202 | * @param integer|null $offset |
1203 | 1203 | * @return array |
1204 | 1204 | */ |
1205 | - public function calendarSearch($principalUri, array $filters, $limit=null, $offset=null) { |
|
1205 | + public function calendarSearch($principalUri, array $filters, $limit = null, $offset = null) { |
|
1206 | 1206 | $calendars = $this->getCalendarsForUser($principalUri); |
1207 | 1207 | $ownCalendars = []; |
1208 | 1208 | $sharedCalendars = []; |
1209 | 1209 | |
1210 | 1210 | $uriMapper = []; |
1211 | 1211 | |
1212 | - foreach($calendars as $calendar) { |
|
1212 | + foreach ($calendars as $calendar) { |
|
1213 | 1213 | if ($calendar['{http://owncloud.org/ns}owner-principal'] === $principalUri) { |
1214 | 1214 | $ownCalendars[] = $calendar['id']; |
1215 | 1215 | } else { |
@@ -1224,11 +1224,11 @@ discard block |
||
1224 | 1224 | $query = $this->db->getQueryBuilder(); |
1225 | 1225 | // Calendar id expressions |
1226 | 1226 | $calendarExpressions = []; |
1227 | - foreach($ownCalendars as $id) { |
|
1227 | + foreach ($ownCalendars as $id) { |
|
1228 | 1228 | $calendarExpressions[] = $query->expr() |
1229 | 1229 | ->eq('c.calendarid', $query->createNamedParameter($id)); |
1230 | 1230 | } |
1231 | - foreach($sharedCalendars as $id) { |
|
1231 | + foreach ($sharedCalendars as $id) { |
|
1232 | 1232 | $calendarExpressions[] = $query->expr()->andX( |
1233 | 1233 | $query->expr()->eq('c.calendarid', |
1234 | 1234 | $query->createNamedParameter($id)), |
@@ -1245,7 +1245,7 @@ discard block |
||
1245 | 1245 | |
1246 | 1246 | // Component expressions |
1247 | 1247 | $compExpressions = []; |
1248 | - foreach($filters['comps'] as $comp) { |
|
1248 | + foreach ($filters['comps'] as $comp) { |
|
1249 | 1249 | $compExpressions[] = $query->expr() |
1250 | 1250 | ->eq('c.componenttype', $query->createNamedParameter($comp)); |
1251 | 1251 | } |
@@ -1257,7 +1257,7 @@ discard block |
||
1257 | 1257 | } |
1258 | 1258 | |
1259 | 1259 | $propExpressions = []; |
1260 | - foreach($filters['props'] as $prop) { |
|
1260 | + foreach ($filters['props'] as $prop) { |
|
1261 | 1261 | $propExpressions[] = $query->expr()->andX( |
1262 | 1262 | $query->expr()->eq('i.name', $query->createNamedParameter($prop)), |
1263 | 1263 | $query->expr()->isNull('i.parameter') |
@@ -1271,7 +1271,7 @@ discard block |
||
1271 | 1271 | } |
1272 | 1272 | |
1273 | 1273 | $paramExpressions = []; |
1274 | - foreach($filters['params'] as $param) { |
|
1274 | + foreach ($filters['params'] as $param) { |
|
1275 | 1275 | $paramExpressions[] = $query->expr()->andX( |
1276 | 1276 | $query->expr()->eq('i.name', $query->createNamedParameter($param['property'])), |
1277 | 1277 | $query->expr()->eq('i.parameter', $query->createNamedParameter($param['parameter'])) |
@@ -1299,8 +1299,8 @@ discard block |
||
1299 | 1299 | $stmt = $query->execute(); |
1300 | 1300 | |
1301 | 1301 | $result = []; |
1302 | - while($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
1303 | - $result[] = $uriMapper[$row['calendarid']] . '/' . $row['uri']; |
|
1302 | + while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
1303 | + $result[] = $uriMapper[$row['calendarid']].'/'.$row['uri']; |
|
1304 | 1304 | } |
1305 | 1305 | |
1306 | 1306 | return $result; |
@@ -1337,7 +1337,7 @@ discard block |
||
1337 | 1337 | $stmt = $query->execute(); |
1338 | 1338 | |
1339 | 1339 | if ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
1340 | - return $row['calendaruri'] . '/' . $row['objecturi']; |
|
1340 | + return $row['calendaruri'].'/'.$row['objecturi']; |
|
1341 | 1341 | } |
1342 | 1342 | |
1343 | 1343 | return null; |
@@ -1402,7 +1402,7 @@ discard block |
||
1402 | 1402 | function getChangesForCalendar($calendarId, $syncToken, $syncLevel, $limit = null) { |
1403 | 1403 | // Current synctoken |
1404 | 1404 | $stmt = $this->db->prepare('SELECT `synctoken` FROM `*PREFIX*calendars` WHERE `id` = ?'); |
1405 | - $stmt->execute([ $calendarId ]); |
|
1405 | + $stmt->execute([$calendarId]); |
|
1406 | 1406 | $currentToken = $stmt->fetchColumn(0); |
1407 | 1407 | |
1408 | 1408 | if (is_null($currentToken)) { |
@@ -1419,8 +1419,8 @@ discard block |
||
1419 | 1419 | if ($syncToken) { |
1420 | 1420 | |
1421 | 1421 | $query = "SELECT `uri`, `operation` FROM `*PREFIX*calendarchanges` WHERE `synctoken` >= ? AND `synctoken` < ? AND `calendarid` = ? ORDER BY `synctoken`"; |
1422 | - if ($limit>0) { |
|
1423 | - $query.= " `LIMIT` " . (int)$limit; |
|
1422 | + if ($limit > 0) { |
|
1423 | + $query .= " `LIMIT` ".(int) $limit; |
|
1424 | 1424 | } |
1425 | 1425 | |
1426 | 1426 | // Fetching all changes |
@@ -1431,15 +1431,15 @@ discard block |
||
1431 | 1431 | |
1432 | 1432 | // This loop ensures that any duplicates are overwritten, only the |
1433 | 1433 | // last change on a node is relevant. |
1434 | - while($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
1434 | + while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
1435 | 1435 | |
1436 | 1436 | $changes[$row['uri']] = $row['operation']; |
1437 | 1437 | |
1438 | 1438 | } |
1439 | 1439 | |
1440 | - foreach($changes as $uri => $operation) { |
|
1440 | + foreach ($changes as $uri => $operation) { |
|
1441 | 1441 | |
1442 | - switch($operation) { |
|
1442 | + switch ($operation) { |
|
1443 | 1443 | case 1 : |
1444 | 1444 | $result['added'][] = $uri; |
1445 | 1445 | break; |
@@ -1509,10 +1509,10 @@ discard block |
||
1509 | 1509 | ->from('calendarsubscriptions') |
1510 | 1510 | ->where($query->expr()->eq('principaluri', $query->createNamedParameter($principalUri))) |
1511 | 1511 | ->orderBy('calendarorder', 'asc'); |
1512 | - $stmt =$query->execute(); |
|
1512 | + $stmt = $query->execute(); |
|
1513 | 1513 | |
1514 | 1514 | $subscriptions = []; |
1515 | - while($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
1515 | + while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
1516 | 1516 | |
1517 | 1517 | $subscription = [ |
1518 | 1518 | 'id' => $row['id'], |
@@ -1521,10 +1521,10 @@ discard block |
||
1521 | 1521 | 'source' => $row['source'], |
1522 | 1522 | 'lastmodified' => $row['lastmodified'], |
1523 | 1523 | |
1524 | - '{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet(['VTODO', 'VEVENT']), |
|
1524 | + '{'.Plugin::NS_CALDAV.'}supported-calendar-component-set' => new SupportedCalendarComponentSet(['VTODO', 'VEVENT']), |
|
1525 | 1525 | ]; |
1526 | 1526 | |
1527 | - foreach($this->subscriptionPropertyMap as $xmlName=>$dbName) { |
|
1527 | + foreach ($this->subscriptionPropertyMap as $xmlName=>$dbName) { |
|
1528 | 1528 | if (!is_null($row[$dbName])) { |
1529 | 1529 | $subscription[$xmlName] = $row[$dbName]; |
1530 | 1530 | } |
@@ -1563,7 +1563,7 @@ discard block |
||
1563 | 1563 | |
1564 | 1564 | $propertiesBoolean = ['striptodos', 'stripalarms', 'stripattachments']; |
1565 | 1565 | |
1566 | - foreach($this->subscriptionPropertyMap as $xmlName=>$dbName) { |
|
1566 | + foreach ($this->subscriptionPropertyMap as $xmlName=>$dbName) { |
|
1567 | 1567 | if (array_key_exists($xmlName, $properties)) { |
1568 | 1568 | $values[$dbName] = $properties[$xmlName]; |
1569 | 1569 | if (in_array($dbName, $propertiesBoolean)) { |
@@ -1611,7 +1611,7 @@ discard block |
||
1611 | 1611 | |
1612 | 1612 | $newValues = []; |
1613 | 1613 | |
1614 | - foreach($mutations as $propertyName=>$propertyValue) { |
|
1614 | + foreach ($mutations as $propertyName=>$propertyValue) { |
|
1615 | 1615 | if ($propertyName === '{http://calendarserver.org/ns/}source') { |
1616 | 1616 | $newValues['source'] = $propertyValue->getHref(); |
1617 | 1617 | } else { |
@@ -1623,7 +1623,7 @@ discard block |
||
1623 | 1623 | $query = $this->db->getQueryBuilder(); |
1624 | 1624 | $query->update('calendarsubscriptions') |
1625 | 1625 | ->set('lastmodified', $query->createNamedParameter(time())); |
1626 | - foreach($newValues as $fieldName=>$value) { |
|
1626 | + foreach ($newValues as $fieldName=>$value) { |
|
1627 | 1627 | $query->set($fieldName, $query->createNamedParameter($value)); |
1628 | 1628 | } |
1629 | 1629 | $query->where($query->expr()->eq('id', $query->createNamedParameter($subscriptionId))) |
@@ -1673,7 +1673,7 @@ discard block |
||
1673 | 1673 | |
1674 | 1674 | $row = $stmt->fetch(\PDO::FETCH_ASSOC); |
1675 | 1675 | |
1676 | - if(!$row) { |
|
1676 | + if (!$row) { |
|
1677 | 1677 | return null; |
1678 | 1678 | } |
1679 | 1679 | |
@@ -1681,8 +1681,8 @@ discard block |
||
1681 | 1681 | 'uri' => $row['uri'], |
1682 | 1682 | 'calendardata' => $row['calendardata'], |
1683 | 1683 | 'lastmodified' => $row['lastmodified'], |
1684 | - 'etag' => '"' . $row['etag'] . '"', |
|
1685 | - 'size' => (int)$row['size'], |
|
1684 | + 'etag' => '"'.$row['etag'].'"', |
|
1685 | + 'size' => (int) $row['size'], |
|
1686 | 1686 | ]; |
1687 | 1687 | } |
1688 | 1688 | |
@@ -1705,13 +1705,13 @@ discard block |
||
1705 | 1705 | ->execute(); |
1706 | 1706 | |
1707 | 1707 | $result = []; |
1708 | - foreach($stmt->fetchAll(\PDO::FETCH_ASSOC) as $row) { |
|
1708 | + foreach ($stmt->fetchAll(\PDO::FETCH_ASSOC) as $row) { |
|
1709 | 1709 | $result[] = [ |
1710 | 1710 | 'calendardata' => $row['calendardata'], |
1711 | 1711 | 'uri' => $row['uri'], |
1712 | 1712 | 'lastmodified' => $row['lastmodified'], |
1713 | - 'etag' => '"' . $row['etag'] . '"', |
|
1714 | - 'size' => (int)$row['size'], |
|
1713 | + 'etag' => '"'.$row['etag'].'"', |
|
1714 | + 'size' => (int) $row['size'], |
|
1715 | 1715 | ]; |
1716 | 1716 | } |
1717 | 1717 | |
@@ -1803,10 +1803,10 @@ discard block |
||
1803 | 1803 | $lastOccurrence = null; |
1804 | 1804 | $uid = null; |
1805 | 1805 | $classification = self::CLASSIFICATION_PUBLIC; |
1806 | - foreach($vObject->getComponents() as $component) { |
|
1807 | - if ($component->name!=='VTIMEZONE') { |
|
1806 | + foreach ($vObject->getComponents() as $component) { |
|
1807 | + if ($component->name !== 'VTIMEZONE') { |
|
1808 | 1808 | $componentType = $component->name; |
1809 | - $uid = (string)$component->UID; |
|
1809 | + $uid = (string) $component->UID; |
|
1810 | 1810 | break; |
1811 | 1811 | } |
1812 | 1812 | } |
@@ -1831,13 +1831,13 @@ discard block |
||
1831 | 1831 | $lastOccurrence = $firstOccurrence; |
1832 | 1832 | } |
1833 | 1833 | } else { |
1834 | - $it = new EventIterator($vObject, (string)$component->UID); |
|
1834 | + $it = new EventIterator($vObject, (string) $component->UID); |
|
1835 | 1835 | $maxDate = new \DateTime(self::MAX_DATE); |
1836 | 1836 | if ($it->isInfinite()) { |
1837 | 1837 | $lastOccurrence = $maxDate->getTimestamp(); |
1838 | 1838 | } else { |
1839 | 1839 | $end = $it->getDtEnd(); |
1840 | - while($it->valid() && $end < $maxDate) { |
|
1840 | + while ($it->valid() && $end < $maxDate) { |
|
1841 | 1841 | $end = $it->getDtEnd(); |
1842 | 1842 | $it->next(); |
1843 | 1843 | |
@@ -2072,10 +2072,10 @@ discard block |
||
2072 | 2072 | $result->closeCursor(); |
2073 | 2073 | |
2074 | 2074 | if (!isset($objectIds['id'])) { |
2075 | - throw new \InvalidArgumentException('Calendarobject does not exists: ' . $uri); |
|
2075 | + throw new \InvalidArgumentException('Calendarobject does not exists: '.$uri); |
|
2076 | 2076 | } |
2077 | 2077 | |
2078 | - return (int)$objectIds['id']; |
|
2078 | + return (int) $objectIds['id']; |
|
2079 | 2079 | } |
2080 | 2080 | |
2081 | 2081 | private function convertPrincipal($principalUri, $toV2) { |
@@ -2090,8 +2090,8 @@ discard block |
||
2090 | 2090 | } |
2091 | 2091 | |
2092 | 2092 | private function addOwnerPrincipal(&$calendarInfo) { |
2093 | - $ownerPrincipalKey = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal'; |
|
2094 | - $displaynameKey = '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD . '}owner-displayname'; |
|
2093 | + $ownerPrincipalKey = '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD.'}owner-principal'; |
|
2094 | + $displaynameKey = '{'.\OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD.'}owner-displayname'; |
|
2095 | 2095 | if (isset($calendarInfo[$ownerPrincipalKey])) { |
2096 | 2096 | $uri = $calendarInfo[$ownerPrincipalKey]; |
2097 | 2097 | } else { |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $offset = $arguments['offset']; |
70 | 70 | $stopAt = $arguments['stopAt']; |
71 | 71 | |
72 | - $this->logger->info('Building calendar index (' . $offset .'/' . $stopAt . ')'); |
|
72 | + $this->logger->info('Building calendar index ('.$offset.'/'.$stopAt.')'); |
|
73 | 73 | |
74 | 74 | $offset = $this->buildIndex($offset, $stopAt); |
75 | 75 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | 'offset' => $offset, |
81 | 81 | 'stopAt' => $stopAt |
82 | 82 | ]); |
83 | - $this->logger->info('New building calendar index job scheduled with offset ' . $offset); |
|
83 | + $this->logger->info('New building calendar index job scheduled with offset '.$offset); |
|
84 | 84 | } |
85 | 85 | } |
86 | 86 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | ->orderBy('id', 'ASC'); |
101 | 101 | |
102 | 102 | $stmt = $query->execute(); |
103 | - while($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
103 | + while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { |
|
104 | 104 | $offset = $row['id']; |
105 | 105 | |
106 | 106 | $calendarData = $row['calendardata']; |