Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ af6de04e9e141466dc229e444ff3f146f4a34765
49dd79eabb2b8902559a7a4e8f8fcad54f46b604
# @nextcloud/vue import paths
b06f5ba4c47450f355a8903c1a93ac68e8c6cfc2
# Update to coding-standard 1.4.0
5981b7eb512aa411f51cad541d01c5c6e93476f0
1 change: 1 addition & 0 deletions apps/cloud_federation_api/lib/Config.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,16 @@ public function addShare($shareWith, $name, $description, $providerId, $owner, $

// check if all required parameters are set
if (
$shareWith === null ||
$name === null ||
$providerId === null ||
$resourceType === null ||
$shareType === null ||
!is_array($protocol) ||
!isset($protocol['name']) ||
!isset($protocol['options']) ||
!is_array($protocol['options']) ||
!isset($protocol['options']['sharedSecret'])
$shareWith === null
|| $name === null
|| $providerId === null
|| $resourceType === null
|| $shareType === null
|| !is_array($protocol)
|| !isset($protocol['name'])
|| !isset($protocol['options'])
|| !is_array($protocol['options'])
|| !isset($protocol['options']['sharedSecret'])
) {
return new JSONResponse(
[
Expand Down Expand Up @@ -340,10 +340,10 @@ public function inviteAccepted(string $recipientProvider, string $token, string
public function receiveNotification($notificationType, $resourceType, $providerId, ?array $notification) {
// check if all required parameters are set
if (
$notificationType === null ||
$resourceType === null ||
$providerId === null ||
!is_array($notification)
$notificationType === null
|| $resourceType === null
|| $providerId === null
|| !is_array($notification)
) {
return new JSONResponse(
[
Expand Down
1 change: 1 addition & 0 deletions apps/comments/lib/Activity/Filter.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down
1 change: 1 addition & 0 deletions apps/comments/lib/Activity/Provider.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down
1 change: 1 addition & 0 deletions apps/comments/lib/Activity/Setting.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down
1 change: 1 addition & 0 deletions apps/comments/lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down
1 change: 1 addition & 0 deletions apps/comments/lib/Collaboration/CommentersSorter.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down
1 change: 1 addition & 0 deletions apps/comments/lib/Controller/NotificationsController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down
1 change: 1 addition & 0 deletions apps/comments/lib/Search/Result.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down
77 changes: 37 additions & 40 deletions apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down Expand Up @@ -60,32 +61,30 @@ public static function sortDataProvider(): array {
#1 – sort properly and otherwise keep existing order
'actors' => ['users' => ['celia' => 3, 'darius' => 7, 'faruk' => 5, 'gail' => 5], 'bots' => ['r2-d2' => 8]],
'input' => [
'users' =>
[
['value' => ['shareWith' => 'alice']],
['value' => ['shareWith' => 'bob']],
['value' => ['shareWith' => 'celia']],
['value' => ['shareWith' => 'darius']],
['value' => ['shareWith' => 'elena']],
['value' => ['shareWith' => 'faruk']],
['value' => ['shareWith' => 'gail']],
],
'users' => [
['value' => ['shareWith' => 'alice']],
['value' => ['shareWith' => 'bob']],
['value' => ['shareWith' => 'celia']],
['value' => ['shareWith' => 'darius']],
['value' => ['shareWith' => 'elena']],
['value' => ['shareWith' => 'faruk']],
['value' => ['shareWith' => 'gail']],
],
'bots' => [
['value' => ['shareWith' => 'c-3po']],
['value' => ['shareWith' => 'r2-d2']],
]
],
'expected' => [
'users' =>
[
['value' => ['shareWith' => 'darius']],
['value' => ['shareWith' => 'faruk']],
['value' => ['shareWith' => 'gail']],
['value' => ['shareWith' => 'celia']],
['value' => ['shareWith' => 'alice']],
['value' => ['shareWith' => 'bob']],
['value' => ['shareWith' => 'elena']],
],
'users' => [
['value' => ['shareWith' => 'darius']],
['value' => ['shareWith' => 'faruk']],
['value' => ['shareWith' => 'gail']],
['value' => ['shareWith' => 'celia']],
['value' => ['shareWith' => 'alice']],
['value' => ['shareWith' => 'bob']],
['value' => ['shareWith' => 'elena']],
],
'bots' => [
['value' => ['shareWith' => 'r2-d2']],
['value' => ['shareWith' => 'c-3po']],
Expand All @@ -96,32 +95,30 @@ public static function sortDataProvider(): array {
#2 – no commentors, input equals output
'actors' => [],
'input' => [
'users' =>
[
['value' => ['shareWith' => 'alice']],
['value' => ['shareWith' => 'bob']],
['value' => ['shareWith' => 'celia']],
['value' => ['shareWith' => 'darius']],
['value' => ['shareWith' => 'elena']],
['value' => ['shareWith' => 'faruk']],
['value' => ['shareWith' => 'gail']],
],
'users' => [
['value' => ['shareWith' => 'alice']],
['value' => ['shareWith' => 'bob']],
['value' => ['shareWith' => 'celia']],
['value' => ['shareWith' => 'darius']],
['value' => ['shareWith' => 'elena']],
['value' => ['shareWith' => 'faruk']],
['value' => ['shareWith' => 'gail']],
],
'bots' => [
['value' => ['shareWith' => 'c-3po']],
['value' => ['shareWith' => 'r2-d2']],
]
],
'expected' => [
'users' =>
[
['value' => ['shareWith' => 'alice']],
['value' => ['shareWith' => 'bob']],
['value' => ['shareWith' => 'celia']],
['value' => ['shareWith' => 'darius']],
['value' => ['shareWith' => 'elena']],
['value' => ['shareWith' => 'faruk']],
['value' => ['shareWith' => 'gail']],
],
'users' => [
['value' => ['shareWith' => 'alice']],
['value' => ['shareWith' => 'bob']],
['value' => ['shareWith' => 'celia']],
['value' => ['shareWith' => 'darius']],
['value' => ['shareWith' => 'elena']],
['value' => ['shareWith' => 'faruk']],
['value' => ['shareWith' => 'gail']],
],
'bots' => [
['value' => ['shareWith' => 'c-3po']],
['value' => ['shareWith' => 'r2-d2']],
Expand Down
1 change: 1 addition & 0 deletions apps/dav/appinfo/routes.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down
1 change: 1 addition & 0 deletions apps/dav/lib/Avatars/RootCollection.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2017 ownCloud GmbH
Expand Down
1 change: 1 addition & 0 deletions apps/dav/lib/BulkUpload/BulkUploadPlugin.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-only
Expand Down
1 change: 1 addition & 0 deletions apps/dav/lib/BulkUpload/MultipartRequestParser.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-only
Expand Down
1 change: 1 addition & 0 deletions apps/dav/lib/CalDAV/Activity/Backend.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down
1 change: 1 addition & 0 deletions apps/dav/lib/CalDAV/Activity/Filter/Calendar.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down
1 change: 1 addition & 0 deletions apps/dav/lib/CalDAV/Activity/Filter/Todo.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down
5 changes: 3 additions & 2 deletions apps/dav/lib/CalDAV/Activity/Provider/Base.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down Expand Up @@ -40,8 +41,8 @@ protected function setSubjects(IEvent $event, string $subject, array $parameters
* @return array
*/
protected function generateCalendarParameter($data, IL10N $l) {
if ($data['uri'] === CalDavBackend::PERSONAL_CALENDAR_URI &&
$data['name'] === CalDavBackend::PERSONAL_CALENDAR_NAME) {
if ($data['uri'] === CalDavBackend::PERSONAL_CALENDAR_URI
&& $data['name'] === CalDavBackend::PERSONAL_CALENDAR_NAME) {
return [
'type' => 'calendar',
'id' => (string)$data['id'],
Expand Down
1 change: 1 addition & 0 deletions apps/dav/lib/CalDAV/Activity/Provider/Calendar.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down
1 change: 1 addition & 0 deletions apps/dav/lib/CalDAV/Activity/Provider/Event.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down
1 change: 1 addition & 0 deletions apps/dav/lib/CalDAV/Activity/Provider/Todo.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down
1 change: 1 addition & 0 deletions apps/dav/lib/CalDAV/Activity/Setting/Calendar.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down
1 change: 1 addition & 0 deletions apps/dav/lib/CalDAV/Activity/Setting/Event.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down
1 change: 1 addition & 0 deletions apps/dav/lib/CalDAV/Activity/Setting/Todo.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down
1 change: 1 addition & 0 deletions apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down
4 changes: 2 additions & 2 deletions apps/dav/lib/CalDAV/BirthdayService.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,8 @@ public function birthdayEvenChanged(string $existingCalendarData,
}

return (
$newCalendarData->VEVENT->DTSTART->getValue() !== $existingBirthday->VEVENT->DTSTART->getValue() ||
$newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue()
$newCalendarData->VEVENT->DTSTART->getValue() !== $existingBirthday->VEVENT->DTSTART->getValue()
|| $newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue()
);
}

Expand Down
9 changes: 5 additions & 4 deletions apps/dav/lib/CalDAV/CalDavBackend.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
Expand Down Expand Up @@ -409,8 +410,8 @@ public function getCalendarsForUser($principalUri) {
// New share can not have more permissions than the old one.
continue;
}
if (isset($calendars[$row['id']][$readOnlyPropertyName]) &&
$calendars[$row['id']][$readOnlyPropertyName] === 0) {
if (isset($calendars[$row['id']][$readOnlyPropertyName])
&& $calendars[$row['id']][$readOnlyPropertyName] === 0) {
// Old share is already read-write, no more permissions can be gained
continue;
}
Expand Down Expand Up @@ -2009,8 +2010,8 @@ public function search(

if ($pattern !== '') {
$innerQuery->andWhere($innerQuery->expr()->iLike('op.value',
$outerQuery->createNamedParameter('%' .
$this->db->escapeLikeParameter($pattern) . '%')));
$outerQuery->createNamedParameter('%'
. $this->db->escapeLikeParameter($pattern) . '%')));
}

$start = null;
Expand Down
4 changes: 2 additions & 2 deletions apps/dav/lib/CalDAV/Calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public function __construct(
if ($this->getName() === BirthdayService::BIRTHDAY_CALENDAR_URI && strcasecmp($this->calendarInfo['{DAV:}displayname'], 'Contact birthdays') === 0) {
$this->calendarInfo['{DAV:}displayname'] = $l10n->t('Contact birthdays');
}
if ($this->getName() === CalDavBackend::PERSONAL_CALENDAR_URI &&
$this->calendarInfo['{DAV:}displayname'] === CalDavBackend::PERSONAL_CALENDAR_NAME) {
if ($this->getName() === CalDavBackend::PERSONAL_CALENDAR_URI
&& $this->calendarInfo['{DAV:}displayname'] === CalDavBackend::PERSONAL_CALENDAR_NAME) {
$this->calendarInfo['{DAV:}displayname'] = $l10n->t('Personal');
}
$this->l10n = $l10n;
Expand Down
1 change: 1 addition & 0 deletions apps/dav/lib/CalDAV/CalendarManager.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
Expand Down
1 change: 1 addition & 0 deletions apps/dav/lib/CalDAV/CalendarObject.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
Expand Down
4 changes: 2 additions & 2 deletions apps/dav/lib/CalDAV/CalendarRoot.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public function getChildForPrincipal(array $principal) {
}

public function getName() {
if ($this->principalPrefix === 'principals/calendar-resources' ||
$this->principalPrefix === 'principals/calendar-rooms') {
if ($this->principalPrefix === 'principals/calendar-resources'
|| $this->principalPrefix === 'principals/calendar-rooms') {
$parts = explode('/', $this->principalPrefix);

return $parts[1];
Expand Down
Loading
Loading