chore: apply new CSFixer rules

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

# Conflicts:
#	apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
pull/53625/head
Ferdinand Thiessen 3 months ago committed by Daniel Kesselberg
parent 28ef8b2689
commit 5981b7eb51
No known key found for this signature in database
GPG Key ID: 4A81C29F63464E8F
  1. 1
      apps/cloud_federation_api/lib/Config.php
  2. 28
      apps/cloud_federation_api/lib/Controller/RequestHandlerController.php
  3. 1
      apps/comments/lib/Activity/Filter.php
  4. 1
      apps/comments/lib/Activity/Provider.php
  5. 1
      apps/comments/lib/Activity/Setting.php
  6. 1
      apps/comments/lib/AppInfo/Application.php
  7. 1
      apps/comments/lib/Collaboration/CommentersSorter.php
  8. 1
      apps/comments/lib/Controller/NotificationsController.php
  9. 1
      apps/comments/lib/Search/Result.php
  10. 77
      apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php
  11. 1
      apps/dav/appinfo/routes.php
  12. 1
      apps/dav/lib/Avatars/RootCollection.php
  13. 1
      apps/dav/lib/BulkUpload/BulkUploadPlugin.php
  14. 1
      apps/dav/lib/BulkUpload/MultipartRequestParser.php
  15. 1
      apps/dav/lib/CalDAV/Activity/Backend.php
  16. 1
      apps/dav/lib/CalDAV/Activity/Filter/Calendar.php
  17. 1
      apps/dav/lib/CalDAV/Activity/Filter/Todo.php
  18. 5
      apps/dav/lib/CalDAV/Activity/Provider/Base.php
  19. 1
      apps/dav/lib/CalDAV/Activity/Provider/Calendar.php
  20. 1
      apps/dav/lib/CalDAV/Activity/Provider/Event.php
  21. 1
      apps/dav/lib/CalDAV/Activity/Provider/Todo.php
  22. 1
      apps/dav/lib/CalDAV/Activity/Setting/Calendar.php
  23. 1
      apps/dav/lib/CalDAV/Activity/Setting/Event.php
  24. 1
      apps/dav/lib/CalDAV/Activity/Setting/Todo.php
  25. 1
      apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php
  26. 4
      apps/dav/lib/CalDAV/BirthdayService.php
  27. 9
      apps/dav/lib/CalDAV/CalDavBackend.php
  28. 4
      apps/dav/lib/CalDAV/Calendar.php
  29. 1
      apps/dav/lib/CalDAV/CalendarManager.php
  30. 1
      apps/dav/lib/CalDAV/CalendarObject.php
  31. 4
      apps/dav/lib/CalDAV/CalendarRoot.php
  32. 10
      apps/dav/lib/CalDAV/EventReader.php
  33. 1
      apps/dav/lib/CalDAV/ICSExportPlugin/ICSExportPlugin.php
  34. 1
      apps/dav/lib/CalDAV/Integration/ExternalCalendar.php
  35. 1
      apps/dav/lib/CalDAV/Integration/ICalendarProvider.php
  36. 1
      apps/dav/lib/CalDAV/InvitationResponse/InvitationResponseServer.php
  37. 1
      apps/dav/lib/CalDAV/Outbox.php
  38. 1
      apps/dav/lib/CalDAV/Principal/Collection.php
  39. 1
      apps/dav/lib/CalDAV/Principal/User.php
  40. 1
      apps/dav/lib/CalDAV/PublicCalendar.php
  41. 1
      apps/dav/lib/CalDAV/PublicCalendarObject.php
  42. 1
      apps/dav/lib/CalDAV/Publishing/PublishPlugin.php
  43. 1
      apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php
  44. 8
      apps/dav/lib/CalDAV/Reminder/ReminderService.php
  45. 11
      apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php
  46. 1
      apps/dav/lib/CalDAV/ResourceBooking/ResourcePrincipalBackend.php
  47. 1
      apps/dav/lib/CalDAV/ResourceBooking/RoomPrincipalBackend.php
  48. 12
      apps/dav/lib/CalDAV/Schedule/IMipService.php
  49. 4
      apps/dav/lib/CalDAV/Schedule/Plugin.php
  50. 5
      apps/dav/lib/CalDAV/Search/SearchPlugin.php
  51. 1
      apps/dav/lib/CalDAV/Search/Xml/Filter/CompFilter.php
  52. 1
      apps/dav/lib/CalDAV/Search/Xml/Filter/LimitFilter.php
  53. 1
      apps/dav/lib/CalDAV/Search/Xml/Filter/OffsetFilter.php
  54. 1
      apps/dav/lib/CalDAV/Search/Xml/Filter/ParamFilter.php
  55. 1
      apps/dav/lib/CalDAV/Search/Xml/Filter/PropFilter.php
  56. 1
      apps/dav/lib/CalDAV/Search/Xml/Filter/SearchTermFilter.php
  57. 1
      apps/dav/lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php
  58. 10
      apps/dav/lib/CalDAV/TipBroker.php
  59. 1
      apps/dav/lib/Capabilities.php
  60. 1
      apps/dav/lib/CardDAV/Activity/Filter.php
  61. 4
      apps/dav/lib/CardDAV/Activity/Provider/Base.php
  62. 4
      apps/dav/lib/CardDAV/AddressBook.php
  63. 4
      apps/dav/lib/CardDAV/AddressBookImpl.php
  64. 4
      apps/dav/lib/CardDAV/CardDavBackend.php
  65. 1
      apps/dav/lib/CardDAV/PhotoCache.php
  66. 1
      apps/dav/lib/Command/ListCalendars.php
  67. 1
      apps/dav/lib/Command/MoveCalendar.php
  68. 1
      apps/dav/lib/Command/SendEventReminders.php
  69. 1
      apps/dav/lib/Connector/Sabre/AnonymousOptionsPlugin.php
  70. 1
      apps/dav/lib/Connector/Sabre/AppleQuirksPlugin.php
  71. 22
      apps/dav/lib/Connector/Sabre/Auth.php
  72. 1
      apps/dav/lib/Connector/Sabre/BearerAuth.php
  73. 1
      apps/dav/lib/Connector/Sabre/CachingTree.php
  74. 4
      apps/dav/lib/Connector/Sabre/DummyGetResponsePlugin.php
  75. 1
      apps/dav/lib/Connector/Sabre/Exception/BadGateway.php
  76. 4
      apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php
  77. 8
      apps/dav/lib/Connector/Sabre/FilesPlugin.php
  78. 1
      apps/dav/lib/Connector/Sabre/MtimeSanitizer.php
  79. 1
      apps/dav/lib/Connector/Sabre/Principal.php
  80. 4
      apps/dav/lib/Connector/Sabre/SharesPlugin.php
  81. 4
      apps/dav/lib/Connector/Sabre/TagsPlugin.php
  82. 1
      apps/dav/lib/Controller/BirthdayCalendarController.php
  83. 5
      apps/dav/lib/DAV/CustomPropertiesBackend.php
  84. 1
      apps/dav/lib/DAV/GroupPrincipalBackend.php
  85. 4
      apps/dav/lib/DAV/Sharing/Backend.php
  86. 1
      apps/dav/lib/Exception/UnsupportedLimitOnInitialSyncException.php
  87. 1
      apps/dav/lib/Files/FileSearchBackend.php
  88. 1
      apps/dav/lib/Files/LazySearchBackend.php
  89. 1
      apps/dav/lib/Files/Sharing/FilesDropPlugin.php
  90. 1
      apps/dav/lib/Migration/BuildCalendarSearchIndex.php
  91. 1
      apps/dav/lib/Migration/BuildSocialSearchIndex.php
  92. 1
      apps/dav/lib/Migration/CalDAVRemoveEmptyValue.php
  93. 1
      apps/dav/lib/Migration/RegenerateBirthdayCalendars.php
  94. 1
      apps/dav/lib/Migration/RemoveObjectProperties.php
  95. 1
      apps/dav/lib/Migration/Version1004Date20170825134824.php
  96. 1
      apps/dav/lib/Migration/Version1004Date20170919104507.php
  97. 1
      apps/dav/lib/Migration/Version1004Date20170924124212.php
  98. 1
      apps/dav/lib/Migration/Version1004Date20170926103422.php
  99. 1
      apps/dav/lib/Migration/Version1005Date20180530124431.php
  100. 1
      apps/dav/lib/Migration/Version1006Date20180619154313.php
  101. Some files were not shown because too many files have changed in this diff Show More

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -118,16 +118,16 @@ class RequestHandlerController extends Controller {
// check if all required parameters are set // check if all required parameters are set
if ( if (
$shareWith === null || $shareWith === null
$name === null || || $name === null
$providerId === null || || $providerId === null
$resourceType === null || || $resourceType === null
$shareType === null || || $shareType === null
!is_array($protocol) || || !is_array($protocol)
!isset($protocol['name']) || || !isset($protocol['name'])
!isset($protocol['options']) || || !isset($protocol['options'])
!is_array($protocol['options']) || || !is_array($protocol['options'])
!isset($protocol['options']['sharedSecret']) || !isset($protocol['options']['sharedSecret'])
) { ) {
return new JSONResponse( return new JSONResponse(
[ [
@ -340,10 +340,10 @@ class RequestHandlerController extends Controller {
public function receiveNotification($notificationType, $resourceType, $providerId, ?array $notification) { public function receiveNotification($notificationType, $resourceType, $providerId, ?array $notification) {
// check if all required parameters are set // check if all required parameters are set
if ( if (
$notificationType === null || $notificationType === null
$resourceType === null || || $resourceType === null
$providerId === null || || $providerId === null
!is_array($notification) || !is_array($notification)
) { ) {
return new JSONResponse( return new JSONResponse(
[ [

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later
@ -60,32 +61,30 @@ class CommentersSorterTest extends TestCase {
#1 – sort properly and otherwise keep existing order #1 – sort properly and otherwise keep existing order
'actors' => ['users' => ['celia' => 3, 'darius' => 7, 'faruk' => 5, 'gail' => 5], 'bots' => ['r2-d2' => 8]], 'actors' => ['users' => ['celia' => 3, 'darius' => 7, 'faruk' => 5, 'gail' => 5], 'bots' => ['r2-d2' => 8]],
'input' => [ 'input' => [
'users' => 'users' => [
[ ['value' => ['shareWith' => 'alice']],
['value' => ['shareWith' => 'alice']], ['value' => ['shareWith' => 'bob']],
['value' => ['shareWith' => 'bob']], ['value' => ['shareWith' => 'celia']],
['value' => ['shareWith' => 'celia']], ['value' => ['shareWith' => 'darius']],
['value' => ['shareWith' => 'darius']], ['value' => ['shareWith' => 'elena']],
['value' => ['shareWith' => 'elena']], ['value' => ['shareWith' => 'faruk']],
['value' => ['shareWith' => 'faruk']], ['value' => ['shareWith' => 'gail']],
['value' => ['shareWith' => 'gail']], ],
],
'bots' => [ 'bots' => [
['value' => ['shareWith' => 'c-3po']], ['value' => ['shareWith' => 'c-3po']],
['value' => ['shareWith' => 'r2-d2']], ['value' => ['shareWith' => 'r2-d2']],
] ]
], ],
'expected' => [ 'expected' => [
'users' => 'users' => [
[ ['value' => ['shareWith' => 'darius']],
['value' => ['shareWith' => 'darius']], ['value' => ['shareWith' => 'faruk']],
['value' => ['shareWith' => 'faruk']], ['value' => ['shareWith' => 'gail']],
['value' => ['shareWith' => 'gail']], ['value' => ['shareWith' => 'celia']],
['value' => ['shareWith' => 'celia']], ['value' => ['shareWith' => 'alice']],
['value' => ['shareWith' => 'alice']], ['value' => ['shareWith' => 'bob']],
['value' => ['shareWith' => 'bob']], ['value' => ['shareWith' => 'elena']],
['value' => ['shareWith' => 'elena']], ],
],
'bots' => [ 'bots' => [
['value' => ['shareWith' => 'r2-d2']], ['value' => ['shareWith' => 'r2-d2']],
['value' => ['shareWith' => 'c-3po']], ['value' => ['shareWith' => 'c-3po']],
@ -96,32 +95,30 @@ class CommentersSorterTest extends TestCase {
#2 – no commentors, input equals output #2 – no commentors, input equals output
'actors' => [], 'actors' => [],
'input' => [ 'input' => [
'users' => 'users' => [
[ ['value' => ['shareWith' => 'alice']],
['value' => ['shareWith' => 'alice']], ['value' => ['shareWith' => 'bob']],
['value' => ['shareWith' => 'bob']], ['value' => ['shareWith' => 'celia']],
['value' => ['shareWith' => 'celia']], ['value' => ['shareWith' => 'darius']],
['value' => ['shareWith' => 'darius']], ['value' => ['shareWith' => 'elena']],
['value' => ['shareWith' => 'elena']], ['value' => ['shareWith' => 'faruk']],
['value' => ['shareWith' => 'faruk']], ['value' => ['shareWith' => 'gail']],
['value' => ['shareWith' => 'gail']], ],
],
'bots' => [ 'bots' => [
['value' => ['shareWith' => 'c-3po']], ['value' => ['shareWith' => 'c-3po']],
['value' => ['shareWith' => 'r2-d2']], ['value' => ['shareWith' => 'r2-d2']],
] ]
], ],
'expected' => [ 'expected' => [
'users' => 'users' => [
[ ['value' => ['shareWith' => 'alice']],
['value' => ['shareWith' => 'alice']], ['value' => ['shareWith' => 'bob']],
['value' => ['shareWith' => 'bob']], ['value' => ['shareWith' => 'celia']],
['value' => ['shareWith' => 'celia']], ['value' => ['shareWith' => 'darius']],
['value' => ['shareWith' => 'darius']], ['value' => ['shareWith' => 'elena']],
['value' => ['shareWith' => 'elena']], ['value' => ['shareWith' => 'faruk']],
['value' => ['shareWith' => 'faruk']], ['value' => ['shareWith' => 'gail']],
['value' => ['shareWith' => 'gail']], ],
],
'bots' => [ 'bots' => [
['value' => ['shareWith' => 'c-3po']], ['value' => ['shareWith' => 'c-3po']],
['value' => ['shareWith' => 'r2-d2']], ['value' => ['shareWith' => 'r2-d2']],

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2017 ownCloud GmbH * SPDX-FileCopyrightText: 2017 ownCloud GmbH

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-only * SPDX-License-Identifier: AGPL-3.0-only

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-only * SPDX-License-Identifier: AGPL-3.0-only

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later
@ -40,8 +41,8 @@ abstract class Base implements IProvider {
* @return array * @return array
*/ */
protected function generateCalendarParameter($data, IL10N $l) { protected function generateCalendarParameter($data, IL10N $l) {
if ($data['uri'] === CalDavBackend::PERSONAL_CALENDAR_URI && if ($data['uri'] === CalDavBackend::PERSONAL_CALENDAR_URI
$data['name'] === CalDavBackend::PERSONAL_CALENDAR_NAME) { && $data['name'] === CalDavBackend::PERSONAL_CALENDAR_NAME) {
return [ return [
'type' => 'calendar', 'type' => 'calendar',
'id' => (string)$data['id'], 'id' => (string)$data['id'],

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -295,8 +295,8 @@ class BirthdayService {
} }
return ( return (
$newCalendarData->VEVENT->DTSTART->getValue() !== $existingBirthday->VEVENT->DTSTART->getValue() || $newCalendarData->VEVENT->DTSTART->getValue() !== $existingBirthday->VEVENT->DTSTART->getValue()
$newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue() || $newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue()
); );
} }

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
@ -409,8 +410,8 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
// New share can not have more permissions than the old one. // New share can not have more permissions than the old one.
continue; continue;
} }
if (isset($calendars[$row['id']][$readOnlyPropertyName]) && if (isset($calendars[$row['id']][$readOnlyPropertyName])
$calendars[$row['id']][$readOnlyPropertyName] === 0) { && $calendars[$row['id']][$readOnlyPropertyName] === 0) {
// Old share is already read-write, no more permissions can be gained // Old share is already read-write, no more permissions can be gained
continue; continue;
} }
@ -2009,8 +2010,8 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
if ($pattern !== '') { if ($pattern !== '') {
$innerQuery->andWhere($innerQuery->expr()->iLike('op.value', $innerQuery->andWhere($innerQuery->expr()->iLike('op.value',
$outerQuery->createNamedParameter('%' . $outerQuery->createNamedParameter('%'
$this->db->escapeLikeParameter($pattern) . '%'))); . $this->db->escapeLikeParameter($pattern) . '%')));
} }
$start = null; $start = null;

@ -53,8 +53,8 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IRestorable, IShareable
if ($this->getName() === BirthdayService::BIRTHDAY_CALENDAR_URI && strcasecmp($this->calendarInfo['{DAV:}displayname'], 'Contact birthdays') === 0) { if ($this->getName() === BirthdayService::BIRTHDAY_CALENDAR_URI && strcasecmp($this->calendarInfo['{DAV:}displayname'], 'Contact birthdays') === 0) {
$this->calendarInfo['{DAV:}displayname'] = $l10n->t('Contact birthdays'); $this->calendarInfo['{DAV:}displayname'] = $l10n->t('Contact birthdays');
} }
if ($this->getName() === CalDavBackend::PERSONAL_CALENDAR_URI && if ($this->getName() === CalDavBackend::PERSONAL_CALENDAR_URI
$this->calendarInfo['{DAV:}displayname'] === CalDavBackend::PERSONAL_CALENDAR_NAME) { && $this->calendarInfo['{DAV:}displayname'] === CalDavBackend::PERSONAL_CALENDAR_NAME) {
$this->calendarInfo['{DAV:}displayname'] = $l10n->t('Personal'); $this->calendarInfo['{DAV:}displayname'] = $l10n->t('Personal');
} }
$this->l10n = $l10n; $this->l10n = $l10n;

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.

@ -33,8 +33,8 @@ class CalendarRoot extends \Sabre\CalDAV\CalendarRoot {
} }
public function getName() { public function getName() {
if ($this->principalPrefix === 'principals/calendar-resources' || if ($this->principalPrefix === 'principals/calendar-resources'
$this->principalPrefix === 'principals/calendar-rooms') { || $this->principalPrefix === 'principals/calendar-rooms') {
$parts = explode('/', $this->principalPrefix); $parts = explode('/', $this->principalPrefix);
return $parts[1]; return $parts[1];

@ -169,9 +169,9 @@ class EventReader {
if (isset($this->baseEvent->DTEND)) { if (isset($this->baseEvent->DTEND)) {
$this->baseEventEndDate = $this->baseEvent->DTEND->getDateTime($this->baseEventEndTimeZone); $this->baseEventEndDate = $this->baseEvent->DTEND->getDateTime($this->baseEventEndTimeZone);
$this->baseEventEndDateFloating = $this->baseEvent->DTEND->isFloating(); $this->baseEventEndDateFloating = $this->baseEvent->DTEND->isFloating();
$this->baseEventDuration = $this->baseEventDuration
$this->baseEvent->DTEND->getDateTime($this->baseEventEndTimeZone)->getTimeStamp() - = $this->baseEvent->DTEND->getDateTime($this->baseEventEndTimeZone)->getTimeStamp()
$this->baseEventStartDate->getTimeStamp(); - $this->baseEventStartDate->getTimeStamp();
} }
// evaluate if duration exists // evaluate if duration exists
// extract duration and calculate end date // extract duration and calculate end date
@ -362,8 +362,8 @@ class EventReader {
public function recurringConcludes(): bool { public function recurringConcludes(): bool {
// retrieve rrule conclusions // retrieve rrule conclusions
if ($this->rruleIterator?->concludesOn() !== null || if ($this->rruleIterator?->concludesOn() !== null
$this->rruleIterator?->concludesAfter() !== null) { || $this->rruleIterator?->concludesAfter() !== null) {
return true; return true;
} }
// retrieve rdate conclusions // retrieve rdate conclusions

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -441,10 +441,10 @@ class ReminderService {
*/ */
private function deleteOrProcessNext(array $reminder, private function deleteOrProcessNext(array $reminder,
VObject\Component\VEvent $vevent):void { VObject\Component\VEvent $vevent):void {
if ($reminder['is_repeat_based'] || if ($reminder['is_repeat_based']
!$reminder['is_recurring'] || || !$reminder['is_recurring']
!$reminder['is_relative'] || || !$reminder['is_relative']
$reminder['is_recurrence_exception']) { || $reminder['is_recurrence_exception']) {
$this->backend->removeReminder($reminder['id']); $this->backend->removeReminder($reminder['id']);
return; return;
} }

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later
@ -85,8 +86,8 @@ abstract class AbstractPrincipalBackend implements BackendInterface {
$metaDataById[$metaDataRow[$this->dbForeignKeyName]] = []; $metaDataById[$metaDataRow[$this->dbForeignKeyName]] = [];
} }
$metaDataById[$metaDataRow[$this->dbForeignKeyName]][$metaDataRow['key']] = $metaDataById[$metaDataRow[$this->dbForeignKeyName]][$metaDataRow['key']]
$metaDataRow['value']; = $metaDataRow['value'];
} }
while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) { while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
@ -470,9 +471,9 @@ abstract class AbstractPrincipalBackend implements BackendInterface {
* @return bool * @return bool
*/ */
private function isAllowedToAccessResource(array $row, array $userGroups): bool { private function isAllowedToAccessResource(array $row, array $userGroups): bool {
if (!isset($row['group_restrictions']) || if (!isset($row['group_restrictions'])
$row['group_restrictions'] === null || || $row['group_restrictions'] === null
$row['group_restrictions'] === '') { || $row['group_restrictions'] === '') {
return true; return true;
} }

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -463,8 +463,8 @@ class IMipService {
$conclusion = null; $conclusion = null;
// days of month // days of month
if ($er->recurringPattern() === 'R') { if ($er->recurringPattern() === 'R') {
$days = implode(', ', array_map(function ($value) { return $this->localizeRelativePositionName($value); }, $er->recurringRelativePositionNamed())) . ' ' . $days = implode(', ', array_map(function ($value) { return $this->localizeRelativePositionName($value); }, $er->recurringRelativePositionNamed())) . ' '
implode(', ', array_map(function ($value) { return $this->localizeDayName($value); }, $er->recurringDaysOfWeekNamed())); . implode(', ', array_map(function ($value) { return $this->localizeDayName($value); }, $er->recurringDaysOfWeekNamed()));
} else { } else {
$days = implode(', ', $er->recurringDaysOfMonth()); $days = implode(', ', $er->recurringDaysOfMonth());
} }
@ -530,8 +530,8 @@ class IMipService {
$months = implode(', ', array_map(function ($value) { return $this->localizeMonthName($value); }, $er->recurringMonthsOfYearNamed())); $months = implode(', ', array_map(function ($value) { return $this->localizeMonthName($value); }, $er->recurringMonthsOfYearNamed()));
// days of month // days of month
if ($er->recurringPattern() === 'R') { if ($er->recurringPattern() === 'R') {
$days = implode(', ', array_map(function ($value) { return $this->localizeRelativePositionName($value); }, $er->recurringRelativePositionNamed())) . ' ' . $days = implode(', ', array_map(function ($value) { return $this->localizeRelativePositionName($value); }, $er->recurringRelativePositionNamed())) . ' '
implode(', ', array_map(function ($value) { return $this->localizeDayName($value); }, $er->recurringDaysOfWeekNamed())); . implode(', ', array_map(function ($value) { return $this->localizeDayName($value); }, $er->recurringDaysOfWeekNamed()));
} else { } else {
$days = $er->startDateTime()->format('jS'); $days = $er->startDateTime()->format('jS');
} }
@ -1108,8 +1108,8 @@ class IMipService {
$attendee = $iTipMessage->recipient; $attendee = $iTipMessage->recipient;
$organizer = $iTipMessage->sender; $organizer = $iTipMessage->sender;
$sequence = $iTipMessage->sequence; $sequence = $iTipMessage->sequence;
$recurrenceId = isset($vevent->{'RECURRENCE-ID'}) ? $recurrenceId = isset($vevent->{'RECURRENCE-ID'})
$vevent->{'RECURRENCE-ID'}->serialize() : null; ? $vevent->{'RECURRENCE-ID'}->serialize() : null;
$uid = $vevent->{'UID'}; $uid = $vevent->{'UID'};
$query = $this->db->getQueryBuilder(); $query = $this->db->getQueryBuilder();

@ -372,8 +372,8 @@ EOF;
return null; return null;
} }
$isResourceOrRoom = str_starts_with($principalUrl, 'principals/calendar-resources') || $isResourceOrRoom = str_starts_with($principalUrl, 'principals/calendar-resources')
str_starts_with($principalUrl, 'principals/calendar-rooms'); || str_starts_with($principalUrl, 'principals/calendar-rooms');
if (str_starts_with($principalUrl, 'principals/users')) { if (str_starts_with($principalUrl, 'principals/users')) {
[, $userId] = split($principalUrl); [, $userId] = split($principalUrl);

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later
@ -61,8 +62,8 @@ class SearchPlugin extends ServerPlugin {
$server->on('report', [$this, 'report']); $server->on('report', [$this, 'report']);
$server->xml->elementMap['{' . self::NS_Nextcloud . '}calendar-search'] = $server->xml->elementMap['{' . self::NS_Nextcloud . '}calendar-search']
CalendarSearchReport::class; = CalendarSearchReport::class;
} }
/** /**

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -124,11 +124,11 @@ class TipBroker extends Broker {
$oldAttendeeInstances = array_keys($attendee['oldInstances']); $oldAttendeeInstances = array_keys($attendee['oldInstances']);
$newAttendeeInstances = array_keys($attendee['newInstances']); $newAttendeeInstances = array_keys($attendee['newInstances']);
$message->significantChange = $message->significantChange
$attendee['forceSend'] === 'REQUEST' || = $attendee['forceSend'] === 'REQUEST'
count($oldAttendeeInstances) !== count($newAttendeeInstances) || || count($oldAttendeeInstances) !== count($newAttendeeInstances)
count(array_diff($oldAttendeeInstances, $newAttendeeInstances)) > 0 || || count(array_diff($oldAttendeeInstances, $newAttendeeInstances)) > 0
$oldEventInfo['significantChangeHash'] !== $eventInfo['significantChangeHash']; || $oldEventInfo['significantChangeHash'] !== $eventInfo['significantChangeHash'];
foreach ($attendee['newInstances'] as $instanceId => $instanceInfo) { foreach ($attendee['newInstances'] as $instanceId => $instanceInfo) {
$currentEvent = clone $eventInfo['instances'][$instanceId]; $currentEvent = clone $eventInfo['instances'][$instanceId];

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2016 ownCloud GmbH * SPDX-FileCopyrightText: 2016 ownCloud GmbH
* SPDX-License-Identifier: AGPL-3.0-only * SPDX-License-Identifier: AGPL-3.0-only

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -41,8 +41,8 @@ abstract class Base implements IProvider {
* @return array * @return array
*/ */
protected function generateAddressbookParameter(array $data, IL10N $l): array { protected function generateAddressbookParameter(array $data, IL10N $l): array {
if ($data['uri'] === CardDavBackend::PERSONAL_ADDRESSBOOK_URI && if ($data['uri'] === CardDavBackend::PERSONAL_ADDRESSBOOK_URI
$data['name'] === CardDavBackend::PERSONAL_ADDRESSBOOK_NAME) { && $data['name'] === CardDavBackend::PERSONAL_ADDRESSBOOK_NAME) {
return [ return [
'type' => 'addressbook', 'type' => 'addressbook',
'id' => (string)$data['id'], 'id' => (string)$data['id'],

@ -38,8 +38,8 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable, IMov
parent::__construct($carddavBackend, $addressBookInfo); parent::__construct($carddavBackend, $addressBookInfo);
if ($this->addressBookInfo['{DAV:}displayname'] === CardDavBackend::PERSONAL_ADDRESSBOOK_NAME && if ($this->addressBookInfo['{DAV:}displayname'] === CardDavBackend::PERSONAL_ADDRESSBOOK_NAME
$this->getName() === CardDavBackend::PERSONAL_ADDRESSBOOK_URI) { && $this->getName() === CardDavBackend::PERSONAL_ADDRESSBOOK_URI) {
$this->addressBookInfo['{DAV:}displayname'] = $l10n->t('Contacts'); $this->addressBookInfo['{DAV:}displayname'] = $l10n->t('Contacts');
} }
} }

@ -307,8 +307,8 @@ class AddressBookImpl implements IAddressBookEnabled {
*/ */
public function isSystemAddressBook(): bool { public function isSystemAddressBook(): bool {
return $this->addressBookInfo['principaluri'] === 'principals/system/system' && ( return $this->addressBookInfo['principaluri'] === 'principals/system/system' && (
$this->addressBookInfo['uri'] === 'system' || $this->addressBookInfo['uri'] === 'system'
$this->addressBookInfo['{DAV:}displayname'] === $this->urlGenerator->getBaseUrl() || $this->addressBookInfo['{DAV:}displayname'] === $this->urlGenerator->getBaseUrl()
); );
} }

@ -159,8 +159,8 @@ class CardDavBackend implements BackendInterface, SyncSupport {
// New share can not have more permissions then the old one. // New share can not have more permissions then the old one.
continue; continue;
} }
if (isset($addressBooks[$row['id']][$readOnlyPropertyName]) && if (isset($addressBooks[$row['id']][$readOnlyPropertyName])
$addressBooks[$row['id']][$readOnlyPropertyName] === 0) { && $addressBooks[$row['id']][$readOnlyPropertyName] === 0) {
// Old share is already read-write, no more permissions can be gained // Old share is already read-write, no more permissions can be gained
continue; continue;
} }

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -55,8 +55,8 @@ class Auth extends AbstractBasic {
* @see https://github.com/owncloud/core/issues/13245 * @see https://github.com/owncloud/core/issues/13245
*/ */
public function isDavAuthenticated(string $username): bool { public function isDavAuthenticated(string $username): bool {
return !is_null($this->session->get(self::DAV_AUTHENTICATED)) && return !is_null($this->session->get(self::DAV_AUTHENTICATED))
$this->session->get(self::DAV_AUTHENTICATED) === $username; && $this->session->get(self::DAV_AUTHENTICATED) === $username;
} }
/** /**
@ -71,8 +71,8 @@ class Auth extends AbstractBasic {
* @throws PasswordLoginForbidden * @throws PasswordLoginForbidden
*/ */
protected function validateUserPass($username, $password) { protected function validateUserPass($username, $password) {
if ($this->userSession->isLoggedIn() && if ($this->userSession->isLoggedIn()
$this->isDavAuthenticated($this->userSession->getUser()->getUID()) && $this->isDavAuthenticated($this->userSession->getUser()->getUID())
) { ) {
$this->session->close(); $this->session->close();
return true; return true;
@ -144,8 +144,8 @@ class Auth extends AbstractBasic {
} }
// If logged-in AND DAV authenticated no check is required // If logged-in AND DAV authenticated no check is required
if ($this->userSession->isLoggedIn() && if ($this->userSession->isLoggedIn()
$this->isDavAuthenticated($this->userSession->getUser()->getUID())) { && $this->isDavAuthenticated($this->userSession->getUser()->getUID())) {
return false; return false;
} }
@ -159,8 +159,8 @@ class Auth extends AbstractBasic {
private function auth(RequestInterface $request, ResponseInterface $response): array { private function auth(RequestInterface $request, ResponseInterface $response): array {
$forcedLogout = false; $forcedLogout = false;
if (!$this->request->passesCSRFCheck() && if (!$this->request->passesCSRFCheck()
$this->requiresCSRFCheck()) { && $this->requiresCSRFCheck()) {
// In case of a fail with POST we need to recheck the credentials // In case of a fail with POST we need to recheck the credentials
if ($this->request->getMethod() === 'POST') { if ($this->request->getMethod() === 'POST') {
$forcedLogout = true; $forcedLogout = true;
@ -178,10 +178,10 @@ class Auth extends AbstractBasic {
} }
if ( if (
//Fix for broken webdav clients //Fix for broken webdav clients
($this->userSession->isLoggedIn() && is_null($this->session->get(self::DAV_AUTHENTICATED))) || ($this->userSession->isLoggedIn() && is_null($this->session->get(self::DAV_AUTHENTICATED)))
//Well behaved clients that only send the cookie are allowed //Well behaved clients that only send the cookie are allowed
($this->userSession->isLoggedIn() && $this->session->get(self::DAV_AUTHENTICATED) === $this->userSession->getUser()->getUID() && empty($request->getHeader('Authorization'))) || || ($this->userSession->isLoggedIn() && $this->session->get(self::DAV_AUTHENTICATED) === $this->userSession->getUser()->getUID() && empty($request->getHeader('Authorization')))
\OC_User::handleApacheAuth() || \OC_User::handleApacheAuth()
) { ) {
$user = $this->userSession->getUser()->getUID(); $user = $this->userSession->getUser()->getUID();
$this->currentUser = $user; $this->currentUser = $user;

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -43,8 +43,8 @@ class DummyGetResponsePlugin extends \Sabre\DAV\ServerPlugin {
* @return false * @return false
*/ */
public function httpGet(RequestInterface $request, ResponseInterface $response) { public function httpGet(RequestInterface $request, ResponseInterface $response) {
$string = 'This is the WebDAV interface. It can only be accessed by ' . $string = 'This is the WebDAV interface. It can only be accessed by '
'WebDAV clients such as the Nextcloud desktop sync client.'; . 'WebDAV clients such as the Nextcloud desktop sync client.';
$stream = fopen('php://memory', 'r+'); $stream = fopen('php://memory', 'r+');
fwrite($stream, $string); fwrite($stream, $string);
rewind($stream); rewind($stream);

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-only * SPDX-License-Identifier: AGPL-3.0-only

@ -117,8 +117,8 @@ class FakeLockerPlugin extends ServerPlugin {
$lockInfo->timeout = 1800; $lockInfo->timeout = 1800;
$body = $this->server->xml->write('{DAV:}prop', [ $body = $this->server->xml->write('{DAV:}prop', [
'{DAV:}lockdiscovery' => '{DAV:}lockdiscovery'
new LockDiscovery([$lockInfo]) => new LockDiscovery([$lockInfo])
]); ]);
$response->setStatus(Http::STATUS_OK); $response->setStatus(Http::STATUS_OK);

@ -257,8 +257,8 @@ class FilesPlugin extends ServerPlugin {
// adds a 'Content-Disposition: attachment' header in case no disposition // adds a 'Content-Disposition: attachment' header in case no disposition
// header has been set before // header has been set before
if ($this->downloadAttachment && if ($this->downloadAttachment
$response->getHeader('Content-Disposition') === null) { && $response->getHeader('Content-Disposition') === null) {
$filename = $node->getName(); $filename = $node->getName();
if ($this->request->isUserAgent( if ($this->request->isUserAgent(
[ [
@ -541,8 +541,8 @@ class FilesPlugin extends ServerPlugin {
$ocmPermissions[] = 'read'; $ocmPermissions[] = 'read';
} }
if (($ncPermissions & Constants::PERMISSION_CREATE) || if (($ncPermissions & Constants::PERMISSION_CREATE)
($ncPermissions & Constants::PERMISSION_UPDATE)) { || ($ncPermissions & Constants::PERMISSION_UPDATE)) {
$ocmPermissions[] = 'write'; $ocmPermissions[] = 'write';
} }

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-only * SPDX-License-Identifier: AGPL-3.0-only

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.

@ -176,8 +176,8 @@ class SharesPlugin extends \Sabre\DAV\ServerPlugin {
if ($sabreNode instanceof Directory if ($sabreNode instanceof Directory
&& $propFind->getDepth() !== 0 && $propFind->getDepth() !== 0
&& ( && (
!is_null($propFind->getStatus(self::SHARETYPES_PROPERTYNAME)) || !is_null($propFind->getStatus(self::SHARETYPES_PROPERTYNAME))
!is_null($propFind->getStatus(self::SHAREES_PROPERTYNAME)) || !is_null($propFind->getStatus(self::SHAREES_PROPERTYNAME))
) )
) { ) {
$folderNode = $sabreNode->getNode(); $folderNode = $sabreNode->getNode();

@ -281,8 +281,8 @@ class TagsPlugin extends \Sabre\DAV\ServerPlugin {
public function handlePreloadProperties(array $nodes, array $requestProperties): void { public function handlePreloadProperties(array $nodes, array $requestProperties): void {
if ( if (
!in_array(self::FAVORITE_PROPERTYNAME, $requestProperties, true) && !in_array(self::FAVORITE_PROPERTYNAME, $requestProperties, true)
!in_array(self::TAGS_PROPERTYNAME, $requestProperties, true) && !in_array(self::TAGS_PROPERTYNAME, $requestProperties, true)
) { ) {
return; return;
} }

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
@ -282,8 +283,8 @@ class CustomPropertiesBackend implements BackendInterface {
*/ */
public function move($source, $destination) { public function move($source, $destination) {
$statement = $this->connection->prepare( $statement = $this->connection->prepare(
'UPDATE `*PREFIX*properties` SET `propertypath` = ?' . 'UPDATE `*PREFIX*properties` SET `propertypath` = ?'
' WHERE `userid` = ? AND `propertypath` = ?' . ' WHERE `userid` = ? AND `propertypath` = ?'
); );
$statement->execute([$this->formatPath($destination), $this->user->getUID(), $this->formatPath($source)]); $statement->execute([$this->formatPath($destination), $this->user->getUID(), $this->formatPath($source)]);
$statement->closeCursor(); $statement->closeCursor();

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.

@ -64,8 +64,8 @@ abstract class Backend {
} }
$principalparts[2] = urldecode($principalparts[2]); $principalparts[2] = urldecode($principalparts[2]);
if (($principalparts[1] === 'users' && !$this->userManager->userExists($principalparts[2])) || if (($principalparts[1] === 'users' && !$this->userManager->userExists($principalparts[2]))
($principalparts[1] === 'groups' && !$this->groupManager->groupExists($principalparts[2]))) { || ($principalparts[1] === 'groups' && !$this->groupManager->groupExists($principalparts[2]))) {
// User or group does not exist // User or group does not exist
continue; continue;
} }

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-only * SPDX-License-Identifier: AGPL-3.0-only

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

@ -1,4 +1,5 @@
<?php <?php
/** /**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later * SPDX-License-Identifier: AGPL-3.0-or-later

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save