Compare commits

..

2 Commits

Author SHA1 Message Date
Christopher Ng 5f0a45ee1c chore(files): Adapt to moved payload
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2024-09-13 17:31:25 -07:00
Christopher Ng fb87dc331b chore(files): Provide old node on moved
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2024-09-13 17:31:25 -07:00
1936 changed files with 11454 additions and 12268 deletions
-4
View File
@@ -11,7 +11,3 @@ aa5f037af71c915424c6dcfd5ad2dc82797dc0d6
af6de04e9e141466dc229e444ff3f146f4a34765
0bd284cb81b6866338aaaa67aa1d81ef9bfbb2ab
8af7ecb2576071f170ecbb0aa2311b26581e40e2
# Update to coding-standard 1.3.1
9836e9b16484582d309c8437ab46d82e34956941
# Automated refactorings
49dd79eabb2b8902559a7a4e8f8fcad54f46b604
-1
View File
@@ -72,7 +72,6 @@ body:
options:
- "28"
- "29"
- "30"
- "master"
validations:
required: true
-14
View File
@@ -59,20 +59,6 @@ updates:
reviewers:
- "nextcloud/server-dependabot"
# phpunit
- package-ecosystem: composer
directory: "/vendor-bin/phpunit"
schedule:
interval: weekly
day: saturday
time: "04:40"
timezone: Europe/Madrid
labels:
- "3. to review"
- "feature: dependencies"
reviewers:
- "nextcloud/server-dependabot"
# Main master npm
- package-ecosystem: npm
directory: "/"
+2 -2
View File
@@ -80,7 +80,7 @@ jobs:
run: npm run cypress:version
- name: Save context
uses: buildjet/cache/save@v4
uses: buildjet/cache/save@e376f15c6ec6dc595375c78633174c7e5f92dc0e # v3
with:
key: cypress-context-${{ github.run_id }}
path: ./
@@ -103,7 +103,7 @@ jobs:
steps:
- name: Restore context
uses: buildjet/cache/restore@v4
uses: buildjet/cache/restore@e376f15c6ec6dc595375c78633174c7e5f92dc0e # v3
with:
fail-on-cache-miss: true
key: cypress-context-${{ github.run_id }}
+2 -2
View File
@@ -99,9 +99,9 @@ jobs:
- name: Run CalDAVTester
run: |
cp "apps/dav/tests/testsuits/caldavtest/serverinfo-${{ matrix.endpoint }}${{ matrix.endpoint == 'old' && (matrix.service == 'CardDAV' && '-carddav' || '-caldav') || '' }}-endpoint.xml" "apps/dav/tests/testsuits/caldavtest/serverinfo.xml"
cp "apps/dav/tests/travis/caldavtest/serverinfo-${{ matrix.endpoint }}${{ matrix.endpoint == 'old' && (matrix.service == 'CardDAV' && '-carddav' || '-caldav') || '' }}-endpoint.xml" "apps/dav/tests/travis/caldavtest/serverinfo.xml"
pushd CalDAVTester
PYTHONPATH="../pycalendar/src" python testcaldav.py --print-details-onfail --basedir "../apps/dav/tests/testsuits/caldavtest" -o cdt.txt \
PYTHONPATH="../pycalendar/src" python testcaldav.py --print-details-onfail --basedir "../apps/dav/tests/travis/caldavtest" -o cdt.txt \
"${{ matrix.service }}/current-user-principal.xml" \
"${{ matrix.service }}/sync-report.xml" \
${{ matrix.endpoint == 'new' && format('{0}/sharing-{1}.xml', matrix.service, matrix.service == 'CalDAV' && 'calendars' || 'addressbooks') || ';' }}
+3 -3
View File
@@ -49,8 +49,8 @@
</Else>
</FilesMatch>
# Let browsers cache OTF and WOFF files for a week
<FilesMatch "\.(otf|woff2?)$">
# Let browsers cache WOFF files for a week
<FilesMatch "\.woff2?$">
Header set Cache-Control "max-age=604800"
</FilesMatch>
</IfModule>
@@ -106,7 +106,7 @@
SetEnvIf Transfer-Encoding "chunked" proxy-sendcl=1
</IfModule>
# Apache disabled the sending of the server-side content-length header
# Apache disabled the sending of the server-side content-length header
# in their 2.4.59 patch updated which breaks some use-cases in Nextcloud.
# Setting ap_trust_cgilike_cl allows to bring back the usual behaviour.
# See https://bz.apache.org/bugzilla/show_bug.cgi?id=68973
+6 -6
View File
@@ -15,7 +15,7 @@ Files: .tx/config
Copyright: 2011-2012 ownCloud, Inc., 2017-2023 Nextcloud GmbH and Nextcloud contributors
License: AGPL-3.0-only
Files: .htaccess
Files: .htaccess
Copyright: 2011-2016 ownCloud, Inc., 2016-2024 Nextcloud GmbH and Nextcloud contributors
License: AGPL-3.0-only
@@ -71,7 +71,7 @@ Files: themes/example/core/img/favicon-touch.png themes/example/core/img/favicon
Copyright: 2015 ownCloud, Inc., 2016 Nextcloud GmbH and Nextcloud contributors
License: AGPL-3.0-only
Files: tests/data/testapp.zip tests/data/testapp2.zip tests/docker/mariadb/oc.cnf apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/1.txt apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/2.txt apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/3.txt apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/4.txt apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/5.txt apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/reports/put/6.txt apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/5.ics apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/6.ics apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/7.ics apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/8.ics apps/dav/tests/testsuits/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/9.ics apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/6.vcf apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/7.vcf apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/8.vcf apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/sharing/read-write/9.vcf apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vreports/put/1.vcf apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vreports/put/2.vcf apps/dav/tests/testsuits/caldavtest/data/Resource/CardDAV/vreports/put/3.vcf
Files: tests/data/testapp.zip tests/data/testapp2.zip tests/docker/mariadb/oc.cnf apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/reports/put/1.txt apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/reports/put/2.txt apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/reports/put/3.txt apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/reports/put/4.txt apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/reports/put/5.txt apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/reports/put/6.txt apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/5.ics apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/6.ics apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/7.ics apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/8.ics apps/dav/tests/travis/caldavtest/data/Resource/CalDAV/sharing/calendars/read-write/9.ics apps/dav/tests/travis/caldavtest/data/Resource/CardDAV/sharing/read-write/6.vcf apps/dav/tests/travis/caldavtest/data/Resource/CardDAV/sharing/read-write/7.vcf apps/dav/tests/travis/caldavtest/data/Resource/CardDAV/sharing/read-write/8.vcf apps/dav/tests/travis/caldavtest/data/Resource/CardDAV/sharing/read-write/9.vcf apps/dav/tests/travis/caldavtest/data/Resource/CardDAV/vreports/put/1.vcf apps/dav/tests/travis/caldavtest/data/Resource/CardDAV/vreports/put/2.vcf apps/dav/tests/travis/caldavtest/data/Resource/CardDAV/vreports/put/3.vcf
Copyright: 2016 ownCloud, Inc.
License: AGPL-3.0-only
@@ -147,7 +147,7 @@ Files: build/stubs/app_api.php build/stubs/SensitiveParameter.phpstub build/stub
Copyright: 2023 Nextcloud GmbH and Nextcloud contributors
License: AGPL-3.0-or-later
Files: apps/dav/tests/unit/test_fixtures/caldav-search-limit-timerange-1.ics apps/dav/tests/unit/test_fixtures/caldav-search-limit-timerange-2.ics apps/dav/tests/unit/test_fixtures/caldav-search-limit-timerange-3.ics apps/dav/tests/unit/test_fixtures/caldav-search-limit-timerange-4.ics apps/dav/tests/unit/test_fixtures/caldav-search-limit-timerange-5.ics apps/dav/tests/unit/test_fixtures/caldav-search-limit-timerange-6.ics apps/dav/tests/unit/test_fixtures/caldav-search-missing-start-1.ics apps/dav/tests/unit/test_fixtures/caldav-search-missing-start-2.ics
Files: apps/dav/tests/misc/caldav-search-limit-timerange-1.ics apps/dav/tests/misc/caldav-search-limit-timerange-2.ics apps/dav/tests/misc/caldav-search-limit-timerange-3.ics apps/dav/tests/misc/caldav-search-limit-timerange-4.ics apps/dav/tests/misc/caldav-search-limit-timerange-5.ics apps/dav/tests/misc/caldav-search-limit-timerange-6.ics apps/dav/tests/misc/caldav-search-missing-start-1.ics apps/dav/tests/misc/caldav-search-missing-start-2.ics
Copyright: 2023 Nextcloud GmbH and Nextcloud contributors
License: AGPL-3.0-or-later
@@ -204,7 +204,7 @@ Copyright: 2016-2024 Collabora Ltd.
License: LicenseRef-CollaboraTrademarks
Files: core/img/twitter.svg core/img/actions/twitter.svg apps/federatedfilesharing/img/social-twitter.svg
Copyright: X Corp.
Copyright: X Corp.
License: LicenseRef-XTrademarks
Files: core/img/facebook.svg apps/federatedfilesharing/img/social-facebook.svg
@@ -327,6 +327,6 @@ Files: apps/settings/tests/UserMigration/assets/account.png
Copyright: 2019 Fabian Wiktor <https://www.pexels.com/photo/green-and-brown-island-on-blue-sea-under-blue-sky-4011450/>
License: CC0-1.0
Files: apps/theming/fonts/OpenDyslexic-Bold.otf apps/theming/fonts/OpenDyslexic-Regular.otf
Copyright: 2012-2019 Abbie Gonzalez <https://abbiecod.es|support@abbiecod.es>, with Reserved Font Name OpenDyslexic.
Files: apps/theming/fonts/OpenDyslexic-Bold.otf apps/theming/fonts/OpenDyslexic-Bold.ttf apps/theming/fonts/OpenDyslexic-Bold.woff apps/theming/fonts/OpenDyslexic-Regular.otf apps/theming/fonts/OpenDyslexic-Regular.ttf apps/theming/fonts/OpenDyslexic-Regular.woff
Copyright: 2012-2019 Abbie Gonzalez <https://abbiecod.es|support@abbiecod.es<, with Reserved Font Name OpenDyslexic.
License: OFL-1.1-RFN
+1 -1
View File
@@ -6,4 +6,4 @@ and our products: “Nextcloud Files”; “Nextcloud Groupware” and “Nextcl
This set of marks is collectively referred to as the “Nextcloud marks.”
Use of Nextcloud logos and other marks is only permitted under the guidelines provided by the Nextcloud GmbH.
A copy can be found at https://nextcloud.com/trademarks/
A copy can be found at https://discord.com/branding
+1 -1
View File
@@ -1,7 +1,7 @@
OC.L10N.register(
"admin_audit",
{
"Auditing / Logging" : "Kiểm tra / Nhật ký‎",
"Auditing / Logging" : "Kiểm tra / Nhật ký‎",
"Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Cung cấp khả năng ghi nhật ký cho Nextcloud, chẳng hạn như ghi nhật ký quyền truy cập tệp hoặc các hành động nhạy cảm khác."
},
"nplurals=1; plural=0;");
+1 -1
View File
@@ -1,5 +1,5 @@
{ "translations": {
"Auditing / Logging" : "Kiểm tra / Nhật ký‎",
"Auditing / Logging" : "Kiểm tra / Nhật ký‎",
"Provides logging abilities for Nextcloud such as logging file accesses or otherwise sensitive actions." : "Cung cấp khả năng ghi nhật ký cho Nextcloud, chẳng hạn như ghi nhật ký quyền truy cập tệp hoặc các hành động nhạy cảm khác."
},"pluralForm" :"nplurals=1; plural=0;"
}
+2 -2
View File
@@ -32,13 +32,13 @@ class Action {
if (!isset($params[$element])) {
if ($obfuscateParameters) {
$this->logger->critical(
'$params["' . $element . '"] was missing.',
'$params["'.$element.'"] was missing.',
['app' => 'admin_audit']
);
} else {
$this->logger->critical(
sprintf(
'$params["' . $element . '"] was missing. Transferred value: %s',
'$params["'.$element.'"] was missing. Transferred value: %s',
print_r($params, true)
),
['app' => 'admin_audit']
+8 -8
View File
@@ -42,7 +42,7 @@ class Files extends Action {
];
} catch (InvalidPathException|NotFoundException $e) {
\OCP\Server::get(LoggerInterface::class)->error(
'Exception thrown in file read: ' . $e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
'Exception thrown in file read: '.$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
);
return;
}
@@ -64,7 +64,7 @@ class Files extends Action {
$this->renamedNodes[$source->getId()] = $source;
} catch (InvalidPathException|NotFoundException $e) {
\OCP\Server::get(LoggerInterface::class)->error(
'Exception thrown in file rename: ' . $e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
'Exception thrown in file rename: '.$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
);
return;
}
@@ -86,7 +86,7 @@ class Files extends Action {
];
} catch (InvalidPathException|NotFoundException $e) {
\OCP\Server::get(LoggerInterface::class)->error(
'Exception thrown in file rename: ' . $e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
'Exception thrown in file rename: '.$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
);
return;
}
@@ -112,7 +112,7 @@ class Files extends Action {
];
} catch (InvalidPathException|NotFoundException $e) {
\OCP\Server::get(LoggerInterface::class)->error(
'Exception thrown in file create: ' . $e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
'Exception thrown in file create: '.$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
);
return;
}
@@ -141,7 +141,7 @@ class Files extends Action {
];
} catch (InvalidPathException|NotFoundException $e) {
\OCP\Server::get(LoggerInterface::class)->error(
'Exception thrown in file copy: ' . $e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
'Exception thrown in file copy: '.$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
);
return;
}
@@ -166,7 +166,7 @@ class Files extends Action {
];
} catch (InvalidPathException|NotFoundException $e) {
\OCP\Server::get(LoggerInterface::class)->error(
'Exception thrown in file write: ' . $e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
'Exception thrown in file write: '.$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
);
return;
}
@@ -194,7 +194,7 @@ class Files extends Action {
];
} catch (InvalidPathException|NotFoundException $e) {
\OCP\Server::get(LoggerInterface::class)->error(
'Exception thrown in file update: ' . $e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
'Exception thrown in file update: '.$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
);
return;
}
@@ -218,7 +218,7 @@ class Files extends Action {
];
} catch (InvalidPathException|NotFoundException $e) {
\OCP\Server::get(LoggerInterface::class)->error(
'Exception thrown in file delete: ' . $e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
'Exception thrown in file delete: '.$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
);
return;
}
@@ -48,7 +48,7 @@ class FileEventListener extends Action implements IEventListener {
);
} catch (InvalidPathException|NotFoundException $e) {
\OCP\Server::get(LoggerInterface::class)->error(
'Exception thrown in file preview: ' . $e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
'Exception thrown in file preview: '.$e->getMessage(), ['app' => 'admin_audit', 'exception' => $e]
);
return;
}
@@ -50,7 +50,7 @@ class RequestHandlerController extends Controller {
private ICloudFederationProviderManager $cloudFederationProviderManager,
private Config $config,
private ICloudFederationFactory $factory,
private ICloudIdManager $cloudIdManager,
private ICloudIdManager $cloudIdManager
) {
parent::__construct($appName, $request);
}
+4 -5
View File
@@ -5,7 +5,6 @@
*/
namespace OCA\Comments\Activity;
use OCP\Activity\Exceptions\UnknownActivityException;
use OCP\Activity\IEvent;
use OCP\Activity\IManager;
use OCP\Activity\IProvider;
@@ -33,12 +32,12 @@ class Provider implements IProvider {
* @param IEvent $event
* @param IEvent|null $previousEvent
* @return IEvent
* @throws UnknownActivityException
* @throws \InvalidArgumentException
* @since 11.0.0
*/
public function parse($language, IEvent $event, ?IEvent $previousEvent = null): IEvent {
if ($event->getApp() !== 'comments') {
throw new UnknownActivityException();
throw new \InvalidArgumentException();
}
$this->l = $this->languageFactory->get('comments', $language);
@@ -60,9 +59,9 @@ class Provider implements IProvider {
}
return $this->parseLongVersion($event);
} else {
throw new \InvalidArgumentException();
}
throw new UnknownActivityException();
}
/**
@@ -33,7 +33,7 @@ class NotificationsController extends Controller {
protected IRootFolder $rootFolder,
protected IURLGenerator $urlGenerator,
protected IManager $notificationManager,
protected IUserSession $userSession,
protected IUserSession $userSession
) {
parent::__construct($appName, $request);
}
+1 -1
View File
@@ -16,7 +16,7 @@ use OCP\Notification\INotification;
class Listener {
public function __construct(
protected IManager $notificationManager,
protected IUserManager $userManager,
protected IUserManager $userManager
) {
}
+1 -1
View File
@@ -25,7 +25,7 @@ class Notifier implements INotifier {
protected IRootFolder $rootFolder,
protected ICommentsManager $commentsManager,
protected IURLGenerator $url,
protected IUserManager $userManager,
protected IUserManager $userManager
) {
}
@@ -65,7 +65,7 @@ class ListenerTest extends TestCase {
);
}
public function testCommentEvent(): void {
public function testCommentEvent() {
$this->appManager->expects($this->any())
->method('isInstalled')
->with('activity')
@@ -30,7 +30,7 @@ class ApplicationTest extends TestCase {
parent::tearDown();
}
public function test(): void {
public function test() {
$app = new Application();
$c = $app->getContainer();
@@ -28,7 +28,7 @@ class CommentersSorterTest extends TestCase {
* @dataProvider sortDataProvider
* @param $data
*/
public function testSort($data): void {
public function testSort($data) {
$commentMocks = [];
foreach ($data['actors'] as $actorType => $actors) {
foreach ($actors as $actorId => $noOfComments) {
@@ -63,7 +63,7 @@ class NotificationsTest extends TestCase {
);
}
public function testViewGuestRedirect(): void {
public function testViewGuestRedirect() {
$this->commentsManager->expects($this->never())
->method('get');
@@ -96,7 +96,7 @@ class NotificationsTest extends TestCase {
$this->assertSame('link-to-login', $response->getRedirectURL());
}
public function testViewSuccess(): void {
public function testViewSuccess() {
$comment = $this->createMock(IComment::class);
$comment->expects($this->any())
->method('getObjectType')
@@ -146,7 +146,7 @@ class NotificationsTest extends TestCase {
$this->assertInstanceOf(RedirectResponse::class, $response);
}
public function testViewInvalidComment(): void {
public function testViewInvalidComment() {
$this->commentsManager->expects($this->any())
->method('get')
->with('42')
@@ -174,7 +174,7 @@ class NotificationsTest extends TestCase {
$this->assertInstanceOf(NotFoundResponse::class, $response);
}
public function testViewNoFile(): void {
public function testViewNoFile() {
$comment = $this->createMock(IComment::class);
$comment->expects($this->any())
->method('getObjectType')
@@ -36,7 +36,7 @@ class EventHandlerTest extends TestCase {
$this->eventHandler = new CommentsEventListener($this->activityListener, $this->notificationListener);
}
public function testNotFiles(): void {
public function testNotFiles() {
/** @var IComment|\PHPUnit\Framework\MockObject\MockObject $comment */
$comment = $this->getMockBuilder(IComment::class)->getMock();
$comment->expects($this->once())
@@ -69,7 +69,7 @@ class EventHandlerTest extends TestCase {
* @dataProvider handledProvider
* @param string $eventType
*/
public function testHandled($eventType): void {
public function testHandled($eventType) {
/** @var IComment|\PHPUnit\Framework\MockObject\MockObject $comment */
$comment = $this->getMockBuilder(IComment::class)->getMock();
$comment->expects($this->once())
@@ -55,7 +55,7 @@ class ListenerTest extends TestCase {
* @param string $eventType
* @param string $notificationMethod
*/
public function testEvaluate($eventType, $notificationMethod): void {
public function testEvaluate($eventType, $notificationMethod) {
/** @var IComment|\PHPUnit\Framework\MockObject\MockObject $comment */
$comment = $this->getMockBuilder(IComment::class)->getMock();
$comment->expects($this->any())
@@ -123,7 +123,7 @@ class ListenerTest extends TestCase {
* @dataProvider eventProvider
* @param string $eventType
*/
public function testEvaluateNoMentions($eventType): void {
public function testEvaluateNoMentions($eventType) {
/** @var IComment|\PHPUnit\Framework\MockObject\MockObject $comment */
$comment = $this->getMockBuilder(IComment::class)->getMock();
$comment->expects($this->any())
@@ -160,7 +160,7 @@ class ListenerTest extends TestCase {
$this->listener->evaluate($event);
}
public function testEvaluateUserDoesNotExist(): void {
public function testEvaluateUserDoesNotExist() {
/** @var IComment|\PHPUnit\Framework\MockObject\MockObject $comment */
$comment = $this->getMockBuilder(IComment::class)->getMock();
$comment->expects($this->any())
@@ -72,7 +72,7 @@ class NotifierTest extends TestCase {
$this->comment = $this->createMock(IComment::class);
}
public function testPrepareSuccess(): void {
public function testPrepareSuccess() {
$fileName = 'Gre\'thor.odp';
$displayName = 'Huraga';
$message = '@Huraga mentioned you in a comment on "Gre\'thor.odp"';
@@ -190,7 +190,7 @@ class NotifierTest extends TestCase {
$this->notifier->prepare($this->notification, $this->lc);
}
public function testPrepareSuccessDeletedUser(): void {
public function testPrepareSuccessDeletedUser() {
$fileName = 'Gre\'thor.odp';
$message = 'You were mentioned on "Gre\'thor.odp", in a comment by an account that has since been deleted';
@@ -305,7 +305,7 @@ class NotifierTest extends TestCase {
}
public function testPrepareDifferentApp(): void {
public function testPrepareDifferentApp() {
$this->expectException(UnknownNotificationException::class);
$this->folder
@@ -342,7 +342,7 @@ class NotifierTest extends TestCase {
}
public function testPrepareNotFound(): void {
public function testPrepareNotFound() {
$this->expectException(UnknownNotificationException::class);
$this->folder
@@ -380,7 +380,7 @@ class NotifierTest extends TestCase {
}
public function testPrepareDifferentSubject(): void {
public function testPrepareDifferentSubject() {
$this->expectException(UnknownNotificationException::class);
$displayName = 'Huraga';
@@ -437,7 +437,7 @@ class NotifierTest extends TestCase {
}
public function testPrepareNotFiles(): void {
public function testPrepareNotFiles() {
$this->expectException(UnknownNotificationException::class);
$displayName = 'Huraga';
@@ -495,7 +495,7 @@ class NotifierTest extends TestCase {
}
public function testPrepareUnresolvableFileID(): void {
public function testPrepareUnresolvableFileID() {
$this->expectException(AlreadyProcessedException::class);
$displayName = 'Huraga';
-1
View File
@@ -54,7 +54,6 @@
<commands>
<command>OCA\DAV\Command\CreateAddressBook</command>
<command>OCA\DAV\Command\CreateCalendar</command>
<command>OCA\DAV\Command\CreateSubscription</command>
<command>OCA\DAV\Command\DeleteCalendar</command>
<command>OCA\DAV\Command\FixCalendarSyncCommand</command>
<command>OCA\DAV\Command\MoveCalendar</command>
@@ -153,7 +153,6 @@ return array(
'OCA\\DAV\\CardDAV\\Xml\\Groups' => $baseDir . '/../lib/CardDAV/Xml/Groups.php',
'OCA\\DAV\\Command\\CreateAddressBook' => $baseDir . '/../lib/Command/CreateAddressBook.php',
'OCA\\DAV\\Command\\CreateCalendar' => $baseDir . '/../lib/Command/CreateCalendar.php',
'OCA\\DAV\\Command\\CreateSubscription' => $baseDir . '/../lib/Command/CreateSubscription.php',
'OCA\\DAV\\Command\\DeleteCalendar' => $baseDir . '/../lib/Command/DeleteCalendar.php',
'OCA\\DAV\\Command\\FixCalendarSyncCommand' => $baseDir . '/../lib/Command/FixCalendarSyncCommand.php',
'OCA\\DAV\\Command\\ListCalendars' => $baseDir . '/../lib/Command/ListCalendars.php',
@@ -168,7 +168,6 @@ class ComposerStaticInitDAV
'OCA\\DAV\\CardDAV\\Xml\\Groups' => __DIR__ . '/..' . '/../lib/CardDAV/Xml/Groups.php',
'OCA\\DAV\\Command\\CreateAddressBook' => __DIR__ . '/..' . '/../lib/Command/CreateAddressBook.php',
'OCA\\DAV\\Command\\CreateCalendar' => __DIR__ . '/..' . '/../lib/Command/CreateCalendar.php',
'OCA\\DAV\\Command\\CreateSubscription' => __DIR__ . '/..' . '/../lib/Command/CreateSubscription.php',
'OCA\\DAV\\Command\\DeleteCalendar' => __DIR__ . '/..' . '/../lib/Command/DeleteCalendar.php',
'OCA\\DAV\\Command\\FixCalendarSyncCommand' => __DIR__ . '/..' . '/../lib/Command/FixCalendarSyncCommand.php',
'OCA\\DAV\\Command\\ListCalendars' => __DIR__ . '/..' . '/../lib/Command/ListCalendars.php',
-1
View File
@@ -198,7 +198,6 @@ OC.L10N.register(
"Accounts" : "حسابات",
"System address book which holds all accounts" : "دفتر عناوين النظام الذي يحوي كل الحسابات",
"File is not updatable: %1$s" : "ملف غير قابل للتعديل: %1$s",
"Failed to get storage for file" : "تعذّر الحصول على مكان لتخزين الملف",
"Could not write to final file, canceled by hook" : "تعذرت الكتابة إلى الملف النهائي، تم إلغاؤه بواسطة خطّاف hook",
"Could not write file contents" : "تعذرت كتابة محتويات الملف",
"_%n byte_::_%n bytes_" : ["بايت","بايت","بايت","بايت","بايت","%n بايت"],
-1
View File
@@ -196,7 +196,6 @@
"Accounts" : "حسابات",
"System address book which holds all accounts" : "دفتر عناوين النظام الذي يحوي كل الحسابات",
"File is not updatable: %1$s" : "ملف غير قابل للتعديل: %1$s",
"Failed to get storage for file" : "تعذّر الحصول على مكان لتخزين الملف",
"Could not write to final file, canceled by hook" : "تعذرت الكتابة إلى الملف النهائي، تم إلغاؤه بواسطة خطّاف hook",
"Could not write file contents" : "تعذرت كتابة محتويات الملف",
"_%n byte_::_%n bytes_" : ["بايت","بايت","بايت","بايت","بايت","%n بايت"],
-1
View File
@@ -198,7 +198,6 @@ OC.L10N.register(
"Accounts" : "Konten",
"System address book which holds all accounts" : "Systemadressbuch, das alle Konten enthält",
"File is not updatable: %1$s" : "Datei kann nicht aktualisiert werden: %1$s",
"Failed to get storage for file" : "Speicherplatz für Datei konnte nicht abgerufen werden",
"Could not write to final file, canceled by hook" : "In die endgültige Datei konnte nicht geschrieben werden, wurde durch einen Hook abgebrochen",
"Could not write file contents" : "Dateiinhalt konnte nicht geschrieben werden",
"_%n byte_::_%n bytes_" : ["%n byte","%n bytes"],
-1
View File
@@ -196,7 +196,6 @@
"Accounts" : "Konten",
"System address book which holds all accounts" : "Systemadressbuch, das alle Konten enthält",
"File is not updatable: %1$s" : "Datei kann nicht aktualisiert werden: %1$s",
"Failed to get storage for file" : "Speicherplatz für Datei konnte nicht abgerufen werden",
"Could not write to final file, canceled by hook" : "In die endgültige Datei konnte nicht geschrieben werden, wurde durch einen Hook abgebrochen",
"Could not write file contents" : "Dateiinhalt konnte nicht geschrieben werden",
"_%n byte_::_%n bytes_" : ["%n byte","%n bytes"],
-1
View File
@@ -198,7 +198,6 @@ OC.L10N.register(
"Accounts" : "Konten",
"System address book which holds all accounts" : "Systemadressbuch, das alle Konten enthält",
"File is not updatable: %1$s" : "Datei kann nicht aktualisiert werden: %1$s",
"Failed to get storage for file" : "Speicherplatz für Datei konnte nicht abgerufen werden",
"Could not write to final file, canceled by hook" : "Konnte nicht in die endgültige Datei schreiben, wurde durch Hook abgebrochen.",
"Could not write file contents" : "Dateiinhalt konnte nicht geschrieben werden",
"_%n byte_::_%n bytes_" : ["%n Byte","%n Bytes"],
-1
View File
@@ -196,7 +196,6 @@
"Accounts" : "Konten",
"System address book which holds all accounts" : "Systemadressbuch, das alle Konten enthält",
"File is not updatable: %1$s" : "Datei kann nicht aktualisiert werden: %1$s",
"Failed to get storage for file" : "Speicherplatz für Datei konnte nicht abgerufen werden",
"Could not write to final file, canceled by hook" : "Konnte nicht in die endgültige Datei schreiben, wurde durch Hook abgebrochen.",
"Could not write file contents" : "Dateiinhalt konnte nicht geschrieben werden",
"_%n byte_::_%n bytes_" : ["%n Byte","%n Bytes"],
-1
View File
@@ -198,7 +198,6 @@ OC.L10N.register(
"Accounts" : "Accounts",
"System address book which holds all accounts" : "System address book which holds all accounts",
"File is not updatable: %1$s" : "File is not updatable: %1$s",
"Failed to get storage for file" : "Failed to get storage for file",
"Could not write to final file, canceled by hook" : "Could not write to final file, cancelled by hook",
"Could not write file contents" : "Could not write file contents",
"_%n byte_::_%n bytes_" : ["%n byte","%n bytes"],
-1
View File
@@ -196,7 +196,6 @@
"Accounts" : "Accounts",
"System address book which holds all accounts" : "System address book which holds all accounts",
"File is not updatable: %1$s" : "File is not updatable: %1$s",
"Failed to get storage for file" : "Failed to get storage for file",
"Could not write to final file, canceled by hook" : "Could not write to final file, cancelled by hook",
"Could not write file contents" : "Could not write file contents",
"_%n byte_::_%n bytes_" : ["%n byte","%n bytes"],
-1
View File
@@ -198,7 +198,6 @@ OC.L10N.register(
"Accounts" : "Cuntais",
"System address book which holds all accounts" : "Leabhar seoltaí córais ina bhfuil gach cuntas",
"File is not updatable: %1$s" : "Ní féidir an comhad a nuashonrú: %1$s",
"Failed to get storage for file" : "Theip ar stóras a fháil don chomhad",
"Could not write to final file, canceled by hook" : "Níorbh fhéidir scríobh chuig an gcomhad deiridh, cealaithe le hook",
"Could not write file contents" : "Níorbh fhéidir inneachar an chomhaid a scríobh",
"_%n byte_::_%n bytes_" : ["%n beart ","%n bearta ","%n bearta","%n bearta","%n bearta"],
-1
View File
@@ -196,7 +196,6 @@
"Accounts" : "Cuntais",
"System address book which holds all accounts" : "Leabhar seoltaí córais ina bhfuil gach cuntas",
"File is not updatable: %1$s" : "Ní féidir an comhad a nuashonrú: %1$s",
"Failed to get storage for file" : "Theip ar stóras a fháil don chomhad",
"Could not write to final file, canceled by hook" : "Níorbh fhéidir scríobh chuig an gcomhad deiridh, cealaithe le hook",
"Could not write file contents" : "Níorbh fhéidir inneachar an chomhaid a scríobh",
"_%n byte_::_%n bytes_" : ["%n beart ","%n bearta ","%n bearta","%n bearta","%n bearta"],
-1
View File
@@ -198,7 +198,6 @@ OC.L10N.register(
"Accounts" : "Contas",
"System address book which holds all accounts" : "Caderno de enderezos do sistema que contén todas as contas",
"File is not updatable: %1$s" : "Non é posíbel actualizar o ficheiro: %1$s",
"Failed to get storage for file" : "Produciuse un fallo ao obter o almacenamento para o ficheiro",
"Could not write to final file, canceled by hook" : "Non foi posíbel escribir no ficheiro final, foi cancelado polo sistema",
"Could not write file contents" : "Non foi posíbel escribir o contido do ficheiro",
"_%n byte_::_%n bytes_" : ["%n byte","%n bytes"],
-1
View File
@@ -196,7 +196,6 @@
"Accounts" : "Contas",
"System address book which holds all accounts" : "Caderno de enderezos do sistema que contén todas as contas",
"File is not updatable: %1$s" : "Non é posíbel actualizar o ficheiro: %1$s",
"Failed to get storage for file" : "Produciuse un fallo ao obter o almacenamento para o ficheiro",
"Could not write to final file, canceled by hook" : "Non foi posíbel escribir no ficheiro final, foi cancelado polo sistema",
"Could not write file contents" : "Non foi posíbel escribir o contido do ficheiro",
"_%n byte_::_%n bytes_" : ["%n byte","%n bytes"],
-1
View File
@@ -198,7 +198,6 @@ OC.L10N.register(
"Accounts" : "Contas",
"System address book which holds all accounts" : "Catálogo de endereços do sistema que contém todas as contas",
"File is not updatable: %1$s" : "O arquivo não é atualizável: %1$s",
"Failed to get storage for file" : "Falha ao obter armazenamento para arquivo",
"Could not write to final file, canceled by hook" : "Não foi possível gravar no arquivo final, cancelado pelo gancho",
"Could not write file contents" : "Não foi possível gravar o conteúdo do arquivo",
"_%n byte_::_%n bytes_" : ["%n byte","%n bytes","%n bytes"],
-1
View File
@@ -196,7 +196,6 @@
"Accounts" : "Contas",
"System address book which holds all accounts" : "Catálogo de endereços do sistema que contém todas as contas",
"File is not updatable: %1$s" : "O arquivo não é atualizável: %1$s",
"Failed to get storage for file" : "Falha ao obter armazenamento para arquivo",
"Could not write to final file, canceled by hook" : "Não foi possível gravar no arquivo final, cancelado pelo gancho",
"Could not write file contents" : "Não foi possível gravar o conteúdo do arquivo",
"_%n byte_::_%n bytes_" : ["%n byte","%n bytes","%n bytes"],
+2 -2
View File
@@ -127,7 +127,7 @@ OC.L10N.register(
"Due on %s by %s" : "Iscadet su %s pro su %s",
"Due on %s" : "iscadet su %s",
"WebDAV endpoint" : "puntu finale WebDAV ",
"Your web server is not yet properly set up to allow file synchronization, because the WebDAV interface seems to be broken." : "Su serbidore tuo no est cunfiguradu pro permìtere sa sincronizatzione de is archìvios, ca s'interfache WebDAV paret arrogada.",
"Your web server is not yet properly set up to allow file synchronization, because the WebDAV interface seems to be broken." : "Su serbidore tuo no est impostadu pro permìtere sa sincronizatzione de is archìvios, ca s'interfache WebDAV paret arrogada.",
"WebDAV" : "WebDAV",
"Save" : "Sarva",
"to" : "a",
@@ -140,7 +140,7 @@ OC.L10N.register(
"Notifications are sent via background jobs, so these must occur often enough." : "Is notìficas sunt imbiadas tràmite atividades dae palas, pro cussu custas operatziones tocat de ddas fàghere bastante a s'ispissu.",
"Enable notifications for events via push" : "Ativa is notìficas de is eventos tràmite push",
"Also install the {calendarappstoreopen}Calendar app{linkclose}, or {calendardocopen}connect your desktop & mobile for syncing ↗{linkclose}." : "Installa puru{calendarappstoreopen}s'aplicatzione calendàriu{linkclose}, o {calendardocopen}connete s'elaboradore de iscrivania e su telefoneddu pro ddos sincronizare↗{linkclose}.",
"Please make sure to properly set up {emailopen}the email server{linkclose}." : "Assegura·ti de àere cunfiguradu bene {emailopen}su serbidore de posta{linkclose}.",
"Please make sure to properly set up {emailopen}the email server{linkclose}." : "Segura·ti de àere impostadu bene {emailopen}su serbidore de posta{linkclose}.",
"There was an error updating your attendance status." : "Ddoe at àpidu un'errore agiornende s'istadu de sa partetzipatzione tua.",
"Please contact the organizer directly." : "Pro praghere, cuntata deretu a s'organizadore.",
"Are you accepting the invitation?" : "Cheres atzetare s'invitu?",
+2 -2
View File
@@ -125,7 +125,7 @@
"Due on %s by %s" : "Iscadet su %s pro su %s",
"Due on %s" : "iscadet su %s",
"WebDAV endpoint" : "puntu finale WebDAV ",
"Your web server is not yet properly set up to allow file synchronization, because the WebDAV interface seems to be broken." : "Su serbidore tuo no est cunfiguradu pro permìtere sa sincronizatzione de is archìvios, ca s'interfache WebDAV paret arrogada.",
"Your web server is not yet properly set up to allow file synchronization, because the WebDAV interface seems to be broken." : "Su serbidore tuo no est impostadu pro permìtere sa sincronizatzione de is archìvios, ca s'interfache WebDAV paret arrogada.",
"WebDAV" : "WebDAV",
"Save" : "Sarva",
"to" : "a",
@@ -138,7 +138,7 @@
"Notifications are sent via background jobs, so these must occur often enough." : "Is notìficas sunt imbiadas tràmite atividades dae palas, pro cussu custas operatziones tocat de ddas fàghere bastante a s'ispissu.",
"Enable notifications for events via push" : "Ativa is notìficas de is eventos tràmite push",
"Also install the {calendarappstoreopen}Calendar app{linkclose}, or {calendardocopen}connect your desktop & mobile for syncing ↗{linkclose}." : "Installa puru{calendarappstoreopen}s'aplicatzione calendàriu{linkclose}, o {calendardocopen}connete s'elaboradore de iscrivania e su telefoneddu pro ddos sincronizare↗{linkclose}.",
"Please make sure to properly set up {emailopen}the email server{linkclose}." : "Assegura·ti de àere cunfiguradu bene {emailopen}su serbidore de posta{linkclose}.",
"Please make sure to properly set up {emailopen}the email server{linkclose}." : "Segura·ti de àere impostadu bene {emailopen}su serbidore de posta{linkclose}.",
"There was an error updating your attendance status." : "Ddoe at àpidu un'errore agiornende s'istadu de sa partetzipatzione tua.",
"Please contact the organizer directly." : "Pro praghere, cuntata deretu a s'organizadore.",
"Are you accepting the invitation?" : "Cheres atzetare s'invitu?",
-2
View File
@@ -198,7 +198,6 @@ OC.L10N.register(
"Accounts" : "Налози",
"System address book which holds all accounts" : "Системски адресар у којем се налазе сви налози",
"File is not updatable: %1$s" : "Фајл не може да се ажурира: %1$s",
"Failed to get storage for file" : "Није успело добијање складишта за фајл",
"Could not write to final file, canceled by hook" : "Не може да се упише у крајњи фајл, отказала је кука",
"Could not write file contents" : "Не може да се упише садржај фајла",
"_%n byte_::_%n bytes_" : ["%n бајт","%n бајта","%n бајтова"],
@@ -213,7 +212,6 @@ OC.L10N.register(
"Failed to unlink: %1$s" : "Није успело уклањање линка: %1$s",
"Failed to write file contents: %1$s" : "Није успело уписивање садржаја фајла: %1$s",
"File not found: %1$s" : "Фајл не може да се пронађе: %1$s",
"Invalid target path" : "Неисправна путања циља",
"System is in maintenance mode." : "Систем је у режиму одржавања.",
"Upgrade needed" : "Потребна надградња",
"Your %s needs to be configured to use HTTPS in order to use CalDAV and CardDAV with iOS/macOS." : "%s мора да буде подешен да користи HTTPS да бисте користи CalDAV и CardDAV са iOS/macOS-ом.",
-2
View File
@@ -196,7 +196,6 @@
"Accounts" : "Налози",
"System address book which holds all accounts" : "Системски адресар у којем се налазе сви налози",
"File is not updatable: %1$s" : "Фајл не може да се ажурира: %1$s",
"Failed to get storage for file" : "Није успело добијање складишта за фајл",
"Could not write to final file, canceled by hook" : "Не може да се упише у крајњи фајл, отказала је кука",
"Could not write file contents" : "Не може да се упише садржај фајла",
"_%n byte_::_%n bytes_" : ["%n бајт","%n бајта","%n бајтова"],
@@ -211,7 +210,6 @@
"Failed to unlink: %1$s" : "Није успело уклањање линка: %1$s",
"Failed to write file contents: %1$s" : "Није успело уписивање садржаја фајла: %1$s",
"File not found: %1$s" : "Фајл не може да се пронађе: %1$s",
"Invalid target path" : "Неисправна путања циља",
"System is in maintenance mode." : "Систем је у режиму одржавања.",
"Upgrade needed" : "Потребна надградња",
"Your %s needs to be configured to use HTTPS in order to use CalDAV and CardDAV with iOS/macOS." : "%s мора да буде подешен да користи HTTPS да бисте користи CalDAV и CardDAV са iOS/macOS-ом.",
-7
View File
@@ -89,7 +89,6 @@ OC.L10N.register(
"When:" : "När",
"Location:" : "Ort:",
"Link:" : "Länk:",
"Occurring:" : "Förekommer:",
"Accept" : "Acceptera",
"Decline" : "Avböj",
"More options …" : "Fler alternativ ...",
@@ -114,13 +113,7 @@ OC.L10N.register(
"November" : "November",
"December" : "December",
"First" : "Första",
"Second" : "Andra",
"Third" : "Tredje",
"Fourth" : "Fjärde",
"Last" : "Sista",
"Second Last" : "Näst sist",
"Third Last" : "Tredje sist",
"Fourth Last" : "Fjärde sist",
"Contacts" : "Kontakter",
"{actor} created address book {addressbook}" : "{actor} skapade adressboken {addressbook}",
"You created address book {addressbook}" : "Du skapade adressboken {addressbook}",
-7
View File
@@ -87,7 +87,6 @@
"When:" : "När",
"Location:" : "Ort:",
"Link:" : "Länk:",
"Occurring:" : "Förekommer:",
"Accept" : "Acceptera",
"Decline" : "Avböj",
"More options …" : "Fler alternativ ...",
@@ -112,13 +111,7 @@
"November" : "November",
"December" : "December",
"First" : "Första",
"Second" : "Andra",
"Third" : "Tredje",
"Fourth" : "Fjärde",
"Last" : "Sista",
"Second Last" : "Näst sist",
"Third Last" : "Tredje sist",
"Fourth Last" : "Fjärde sist",
"Contacts" : "Kontakter",
"{actor} created address book {addressbook}" : "{actor} skapade adressboken {addressbook}",
"You created address book {addressbook}" : "Du skapade adressboken {addressbook}",
-1
View File
@@ -198,7 +198,6 @@ OC.L10N.register(
"Accounts" : "Hesaplar",
"System address book which holds all accounts" : "Tüm hesapların bulunduğu sistem adres defteri",
"File is not updatable: %1$s" : "Dosya güncellenebilir değil: %1$s",
"Failed to get storage for file" : "Dosyanın depolaması alınamadı",
"Could not write to final file, canceled by hook" : "Sonuç dosyasına yazılamadı, bağlantı tarafından iptal edildi",
"Could not write file contents" : "Dosya içerikleri yazılamadı",
"_%n byte_::_%n bytes_" : ["%n bayt","%n bayt"],
-1
View File
@@ -196,7 +196,6 @@
"Accounts" : "Hesaplar",
"System address book which holds all accounts" : "Tüm hesapların bulunduğu sistem adres defteri",
"File is not updatable: %1$s" : "Dosya güncellenebilir değil: %1$s",
"Failed to get storage for file" : "Dosyanın depolaması alınamadı",
"Could not write to final file, canceled by hook" : "Sonuç dosyasına yazılamadı, bağlantı tarafından iptal edildi",
"Could not write file contents" : "Dosya içerikleri yazılamadı",
"_%n byte_::_%n bytes_" : ["%n bayt","%n bayt"],
-1
View File
@@ -198,7 +198,6 @@ OC.L10N.register(
"Accounts" : "帳戶",
"System address book which holds all accounts" : "包含所有帳戶的系統通訊錄",
"File is not updatable: %1$s" : "檔案無法更新:%1$s",
"Failed to get storage for file" : "無法取得檔案儲存空間",
"Could not write to final file, canceled by hook" : "無法寫入最終檔案,被掛勾取消",
"Could not write file contents" : "無法寫入檔案內容",
"_%n byte_::_%n bytes_" : ["%n 位元組"],
-1
View File
@@ -196,7 +196,6 @@
"Accounts" : "帳戶",
"System address book which holds all accounts" : "包含所有帳戶的系統通訊錄",
"File is not updatable: %1$s" : "檔案無法更新:%1$s",
"Failed to get storage for file" : "無法取得檔案儲存空間",
"Could not write to final file, canceled by hook" : "無法寫入最終檔案,被掛勾取消",
"Could not write file contents" : "無法寫入檔案內容",
"_%n byte_::_%n bytes_" : ["%n 位元組"],
-1
View File
@@ -198,7 +198,6 @@ OC.L10N.register(
"Accounts" : "帳號",
"System address book which holds all accounts" : "包含所有帳號的系統通訊錄",
"File is not updatable: %1$s" : "檔案無法更新:%1$s",
"Failed to get storage for file" : "無法取得檔案儲存空間",
"Could not write to final file, canceled by hook" : "無法寫入最終檔案,被掛勾取消",
"Could not write file contents" : "無法寫入檔案內容",
"_%n byte_::_%n bytes_" : ["%n 位元組"],
-1
View File
@@ -196,7 +196,6 @@
"Accounts" : "帳號",
"System address book which holds all accounts" : "包含所有帳號的系統通訊錄",
"File is not updatable: %1$s" : "檔案無法更新:%1$s",
"Failed to get storage for file" : "無法取得檔案儲存空間",
"Could not write to final file, canceled by hook" : "無法寫入最終檔案,被掛勾取消",
"Could not write file contents" : "無法寫入檔案內容",
"_%n byte_::_%n bytes_" : ["%n 位元組"],
@@ -56,7 +56,7 @@ class BuildReminderIndexBackgroundJob extends QueuedJob {
$offset = (int)$argument['offset'];
$stopAt = (int)$argument['stopAt'];
$this->logger->info('Building calendar reminder index (' . $offset . '/' . $stopAt . ')');
$this->logger->info('Building calendar reminder index (' . $offset .'/' . $stopAt . ')');
$offset = $this->buildIndex($offset, $stopAt);
@@ -28,16 +28,14 @@ use Sabre\VObject\Reader;
use Sabre\VObject\Recur\RRuleIterator;
class UserStatusAutomation extends TimedJob {
public function __construct(
private ITimeFactory $timeFactory,
public function __construct(private ITimeFactory $timeFactory,
private IDBConnection $connection,
private IJobList $jobList,
private LoggerInterface $logger,
private IManager $manager,
private IConfig $config,
private IAvailabilityCoordinator $coordinator,
private IUserManager $userManager,
) {
private IUserManager $userManager) {
parent::__construct($timeFactory);
// Interval 0 might look weird, but the last_checked is always moved
+1 -1
View File
@@ -22,7 +22,7 @@ class BulkUploadPlugin extends ServerPlugin {
public function __construct(
Folder $userFolder,
LoggerInterface $logger,
LoggerInterface $logger
) {
$this->userFolder = $userFolder;
$this->logger = $logger;
@@ -45,8 +45,8 @@ class MultipartRequestParser {
$this->stream = $stream;
$boundary = $this->parseBoundaryFromHeaders($contentType);
$this->boundary = '--' . $boundary . "\r\n";
$this->lastBoundary = '--' . $boundary . "--\r\n";
$this->boundary = '--'.$boundary."\r\n";
$this->lastBoundary = '--'.$boundary."--\r\n";
}
/**
@@ -134,7 +134,7 @@ class MultipartRequestParser {
$headers = $this->readPartHeaders();
$content = $this->readPartContent((int)$headers['content-length'], $headers['x-file-md5']);
$content = $this->readPartContent($headers['content-length'], $headers['x-file-md5']);
return [$headers, $content];
}
@@ -5,7 +5,6 @@
*/
namespace OCA\DAV\CalDAV\Activity\Provider;
use OCP\Activity\Exceptions\UnknownActivityException;
use OCP\Activity\IEvent;
use OCP\Activity\IEventMerger;
use OCP\Activity\IManager;
@@ -60,12 +59,12 @@ class Calendar extends Base {
* @param IEvent $event
* @param IEvent|null $previousEvent
* @return IEvent
* @throws UnknownActivityException
* @throws \InvalidArgumentException
* @since 11.0.0
*/
public function parse($language, IEvent $event, ?IEvent $previousEvent = null) {
if ($event->getApp() !== 'dav' || $event->getType() !== 'calendar') {
throw new UnknownActivityException();
throw new \InvalidArgumentException();
}
$this->l = $this->languageFactory->get('dav', $language);
@@ -123,7 +122,7 @@ class Calendar extends Base {
} elseif ($event->getSubject() === self::SUBJECT_UNSHARE_GROUP . '_by') {
$subject = $this->l->t('{actor} unshared calendar {calendar} from group {group}');
} else {
throw new UnknownActivityException();
throw new \InvalidArgumentException();
}
$parsedParameters = $this->getParameters($event);
@@ -6,7 +6,6 @@
namespace OCA\DAV\CalDAV\Activity\Provider;
use OC_App;
use OCP\Activity\Exceptions\UnknownActivityException;
use OCP\Activity\IEvent;
use OCP\Activity\IEventMerger;
use OCP\Activity\IManager;
@@ -107,12 +106,12 @@ class Event extends Base {
* @param IEvent $event
* @param IEvent|null $previousEvent
* @return IEvent
* @throws UnknownActivityException
* @throws \InvalidArgumentException
* @since 11.0.0
*/
public function parse($language, IEvent $event, ?IEvent $previousEvent = null) {
if ($event->getApp() !== 'dav' || $event->getType() !== 'calendar_event') {
throw new UnknownActivityException();
throw new \InvalidArgumentException();
}
$this->l = $this->languageFactory->get('dav', $language);
@@ -148,7 +147,7 @@ class Event extends Base {
} elseif ($event->getSubject() === self::SUBJECT_OBJECT_RESTORE . '_event_self') {
$subject = $this->l->t('You restored event {event} of calendar {calendar}');
} else {
throw new UnknownActivityException();
throw new \InvalidArgumentException();
}
$parsedParameters = $this->getParameters($event);
@@ -5,7 +5,6 @@
*/
namespace OCA\DAV\CalDAV\Activity\Provider;
use OCP\Activity\Exceptions\UnknownActivityException;
use OCP\Activity\IEvent;
class Todo extends Event {
@@ -15,12 +14,12 @@ class Todo extends Event {
* @param IEvent $event
* @param IEvent|null $previousEvent
* @return IEvent
* @throws UnknownActivityException
* @throws \InvalidArgumentException
* @since 11.0.0
*/
public function parse($language, IEvent $event, ?IEvent $previousEvent = null) {
if ($event->getApp() !== 'dav' || $event->getType() !== 'calendar_todo') {
throw new UnknownActivityException();
throw new \InvalidArgumentException();
}
$this->l = $this->languageFactory->get('dav', $language);
@@ -56,7 +55,7 @@ class Todo extends Event {
} elseif ($event->getSubject() === self::SUBJECT_OBJECT_MOVE . '_todo_self') {
$subject = $this->l->t('You moved to-do {todo} from list {sourceCalendar} to list {targetCalendar}');
} else {
throw new UnknownActivityException();
throw new \InvalidArgumentException();
}
$parsedParameters = $this->getParameters($event);
@@ -110,7 +110,7 @@ class EnablePlugin extends ServerPlugin {
$requestBody = $request->getBodyAsString();
$this->server->xml->parse($requestBody, $request->getUrl(), $documentType);
if ($documentType !== '{' . self::NS_Nextcloud . '}enable-birthday-calendar') {
if ($documentType !== '{'.self::NS_Nextcloud.'}enable-birthday-calendar') {
return;
}
+3 -3
View File
@@ -108,7 +108,7 @@ class BirthdayService {
$calendar = $this->ensureCalendarExists($principalUri);
foreach (['', '-death', '-anniversary'] as $tag) {
$objectUri = $book['uri'] . '-' . $cardUri . $tag . '.ics';
$objectUri = $book['uri'] . '-' . $cardUri . $tag .'.ics';
$this->calDavBackEnd->deleteCalendarObject($calendar['id'], $objectUri, CalDavBackend::CALENDAR_TYPE_CALENDAR, true);
}
}
@@ -264,7 +264,7 @@ class BirthdayService {
* @param string $user
*/
public function resetForUser(string $user):void {
$principal = 'principals/users/' . $user;
$principal = 'principals/users/'.$user;
$calendar = $this->calDavBackEnd->getCalendarByUri($principal, self::BIRTHDAY_CALENDAR_URI);
if (!$calendar) {
return; // The user's birthday calendar doesn't exist, no need to purge it
@@ -281,7 +281,7 @@ class BirthdayService {
* @throws \Sabre\DAV\Exception\BadRequest
*/
public function syncUser(string $user):void {
$principal = 'principals/users/' . $user;
$principal = 'principals/users/'.$user;
$this->ensureCalendarExists($principal);
$books = $this->cardDavBackEnd->getAddressBooksForUser($principal);
foreach ($books as $book) {
@@ -20,7 +20,7 @@ class CachedSubscriptionImpl implements ICalendar {
public function __construct(
CachedSubscription $calendar,
array $calendarInfo,
CalDavBackend $backend,
CalDavBackend $backend
) {
$this->calendar = $calendar;
$this->calendarInfo = $calendarInfo;
@@ -13,7 +13,7 @@ use OCP\Calendar\ICalendarProvider;
class CachedSubscriptionProvider implements ICalendarProvider {
public function __construct(
private CalDavBackend $calDavBackend,
private CalDavBackend $calDavBackend
) {
}
+38 -53
View File
@@ -65,7 +65,6 @@ use Sabre\VObject\ParseException;
use Sabre\VObject\Property;
use Sabre\VObject\Reader;
use Sabre\VObject\Recur\EventIterator;
use Sabre\VObject\Recur\MaxInstancesExceededException;
use Sabre\VObject\Recur\NoInstancesException;
use function array_column;
use function array_map;
@@ -330,8 +329,8 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'id' => $row['id'],
'uri' => $row['uri'],
'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken'] ?: '0'),
'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0',
'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'),
'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal' => $this->convertPrincipal($principalUri, !$this->legacyEndpoint),
@@ -354,7 +353,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$fields = array_column($this->propertyMap, 0);
$fields = array_map(function (string $field) {
return 'a.' . $field;
return 'a.'.$field;
}, $fields);
$fields[] = 'a.id';
$fields[] = 'a.uri';
@@ -412,8 +411,8 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'id' => $row['id'],
'uri' => $uri,
'principaluri' => $this->convertPrincipal($principalUri, !$this->legacyEndpoint),
'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken'] ?: '0'),
'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0',
'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'),
'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp('transparent'),
'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
@@ -462,8 +461,8 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'id' => $row['id'],
'uri' => $row['uri'],
'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken'] ?: '0'),
'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0',
'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'),
'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
];
@@ -514,8 +513,8 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'id' => $row['id'],
'uri' => $row['publicuri'],
'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken'] ?: '0'),
'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0',
'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'),
'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal' => $this->convertPrincipal($row['principaluri'], $this->legacyEndpoint),
@@ -579,8 +578,8 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'id' => $row['id'],
'uri' => $row['publicuri'],
'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken'] ?: '0'),
'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0',
'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'),
'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
@@ -633,8 +632,8 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'id' => $row['id'],
'uri' => $row['uri'],
'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken'] ?: '0'),
'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0',
'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'),
'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
];
@@ -681,7 +680,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'id' => $row['id'],
'uri' => $row['uri'],
'principaluri' => $this->convertPrincipal($row['principaluri'], !$this->legacyEndpoint),
'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken'] ?: '0'),
'{' . Plugin::NS_CALENDARSERVER . '}getctag' => 'http://sabre.io/ns/sync/' . ($row['synctoken']?$row['synctoken']:'0'),
'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?? 0,
'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
@@ -727,7 +726,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'source' => $row['source'],
'lastmodified' => $row['lastmodified'],
'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet(['VTODO', 'VEVENT']),
'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0',
'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
];
return $this->rowToSubscription($row, $subscription);
@@ -1713,19 +1712,13 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
try {
$matches = $this->validateFilterForObject($row, $filters);
} catch (ParseException $ex) {
$this->logger->error('Caught parsing exception for calendar data. This usually indicates invalid calendar data. calendar-id:' . $calendarId . ' uri:' . $row['uri'], [
$this->logger->error('Caught parsing exception for calendar data. This usually indicates invalid calendar data. calendar-id:'.$calendarId.' uri:'.$row['uri'], [
'app' => 'dav',
'exception' => $ex,
]);
continue;
} catch (InvalidDataException $ex) {
$this->logger->error('Caught invalid data exception for calendar data. This usually indicates invalid calendar data. calendar-id:' . $calendarId . ' uri:' . $row['uri'], [
'app' => 'dav',
'exception' => $ex,
]);
continue;
} catch (MaxInstancesExceededException $ex) {
$this->logger->warning('Caught max instances exceeded exception for calendar data. This usually indicates too much recurring (more than 3500) event in calendar data. Object uri: ' . $row['uri'], [
$this->logger->error('Caught invalid data exception for calendar data. This usually indicates invalid calendar data. calendar-id:'.$calendarId.' uri:'.$row['uri'], [
'app' => 'dav',
'exception' => $ex,
]);
@@ -1848,7 +1841,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
->andWhere($compExpr)
->andWhere($propParamExpr)
->andWhere($query->expr()->iLike('i.value',
$query->createNamedParameter('%' . $this->db->escapeLikeParameter($filters['search-term']) . '%')))
$query->createNamedParameter('%'.$this->db->escapeLikeParameter($filters['search-term']).'%')))
->andWhere($query->expr()->isNull('deleted_at'));
if ($offset) {
@@ -1890,7 +1883,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
array $searchProperties,
array $options,
$limit,
$offset,
$offset
) {
$outerQuery = $this->db->getQueryBuilder();
$innerQuery = $this->db->getQueryBuilder();
@@ -2066,7 +2059,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
return $calendarObjects;
}
private function searchCalendarObjects(IQueryBuilder $query, ?DateTimeInterface $start, ?DateTimeInterface $end): array {
private function searchCalendarObjects(IQueryBuilder $query, DateTimeInterface|null $start, DateTimeInterface|null $end): array {
$calendarObjects = [];
$filterByTimeRange = ($start instanceof DateTimeInterface) || ($end instanceof DateTimeInterface);
@@ -2079,32 +2072,24 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
continue;
}
try {
$isValid = $this->validateFilterForObject($row, [
'name' => 'VCALENDAR',
'comp-filters' => [
[
'name' => 'VEVENT',
'comp-filters' => [],
'prop-filters' => [],
'is-not-defined' => false,
'time-range' => [
'start' => $start,
'end' => $end,
],
$isValid = $this->validateFilterForObject($row, [
'name' => 'VCALENDAR',
'comp-filters' => [
[
'name' => 'VEVENT',
'comp-filters' => [],
'prop-filters' => [],
'is-not-defined' => false,
'time-range' => [
'start' => $start,
'end' => $end,
],
],
'prop-filters' => [],
'is-not-defined' => false,
'time-range' => null,
]);
} catch (MaxInstancesExceededException $ex) {
$this->logger->warning('Caught max instances exceeded exception for calendar data. This usually indicates too much recurring (more than 3500) event in calendar data. Object uri: ' . $row['uri'], [
'app' => 'dav',
'exception' => $ex,
]);
continue;
}
],
'prop-filters' => [],
'is-not-defined' => false,
'time-range' => null,
]);
if (is_resource($row['calendardata'])) {
// Put the stream back to the beginning so it can be read another time
@@ -2196,7 +2181,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
array $componentTypes,
array $searchProperties,
array $searchParameters,
array $options = [],
array $options = []
): array {
return $this->atomic(function () use ($principalUri, $pattern, $componentTypes, $searchProperties, $searchParameters, $options) {
$escapePattern = !\array_key_exists('escape_like_param', $options) || $options['escape_like_param'] !== false;
@@ -2575,7 +2560,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'lastmodified' => $row['lastmodified'],
'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet(['VTODO', 'VEVENT']),
'{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0',
'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
];
$subscriptions[] = $this->rowToSubscription($row, $subscription);
+2 -2
View File
@@ -189,8 +189,8 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IRestorable, IShareable
$acl = $this->caldavBackend->applyShareAcl($this->getResourceId(), $acl);
$allowedPrincipals = [
$this->getOwner(),
$this->getOwner() . '/calendar-proxy-read',
$this->getOwner() . '/calendar-proxy-write',
$this->getOwner(). '/calendar-proxy-read',
$this->getOwner(). '/calendar-proxy-write',
parent::getOwner(),
'principals/system/public'
];
+1 -1
View File
@@ -42,7 +42,7 @@ class CalendarHome extends \Sabre\CalDAV\CalendarHome {
BackendInterface $caldavBackend,
array $principalInfo,
LoggerInterface $logger,
private bool $returnCachedSubscriptions,
private bool $returnCachedSubscriptions
) {
parent::__construct($caldavBackend, $principalInfo);
$this->l10n = \OC::$server->getL10N('dav');
+1 -1
View File
@@ -20,7 +20,7 @@ class CalendarRoot extends \Sabre\CalDAV\CalendarRoot {
PrincipalBackend\BackendInterface $principalBackend,
Backend\BackendInterface $caldavBackend,
$principalPrefix,
LoggerInterface $logger,
LoggerInterface $logger
) {
parent::__construct($principalBackend, $caldavBackend, $principalPrefix);
$this->logger = $logger;
+7 -7
View File
@@ -89,7 +89,7 @@ class EventReader {
$events = $input->getByUID($uid);
// evaluate if any event where found
if (count($events) === 0) {
throw new InvalidArgumentException('This VCALENDAR did not have an event with UID: ' . $uid);
throw new InvalidArgumentException('This VCALENDAR did not have an event with UID: '.$uid);
}
// extract calendar timezone
if (isset($input->VTIMEZONE) && isset($input->VTIMEZONE->TZID)) {
@@ -297,7 +297,7 @@ class EventReader {
*
* @return string|null R - Relative or A - Absolute
*/
public function recurringPattern(): ?string {
public function recurringPattern(): string|null {
if ($this->rruleIterator === null && $this->rdateIterator === null) {
return null;
}
@@ -314,7 +314,7 @@ class EventReader {
*
* @return string|null daily, weekly, monthly, yearly, fixed
*/
public function recurringPrecision(): ?string {
public function recurringPrecision(): string|null {
if ($this->rruleIterator !== null) {
return $this->rruleIterator->precision();
}
@@ -331,7 +331,7 @@ class EventReader {
*
* @return int|null
*/
public function recurringInterval(): ?int {
public function recurringInterval(): int|null {
return $this->rruleIterator?->interval();
}
@@ -374,7 +374,7 @@ class EventReader {
*
* @return int|null
*/
public function recurringConcludesAfter(): ?int {
public function recurringConcludesAfter(): int|null {
// construct count place holder
$count = 0;
@@ -399,7 +399,7 @@ class EventReader {
*
* @return DateTime|null
*/
public function recurringConcludesOn(): ?DateTime {
public function recurringConcludesOn(): DateTime|null {
if ($this->rruleIterator !== null) {
// retrieve rrule conclusion date
@@ -626,7 +626,7 @@ class EventReader {
*
* @return DateTime
*/
public function recurrenceDate(): ?DateTime {
public function recurrenceDate(): DateTime|null {
if ($this->recurrenceCurrentDate !== null) {
return DateTime::createFromInterface($this->recurrenceCurrentDate);
} else {
+3 -3
View File
@@ -13,15 +13,15 @@ use DateTime;
class EventReaderRDate extends \Sabre\VObject\Recur\RDateIterator {
public function concludes(): ?DateTime {
public function concludes(): DateTime|null {
return $this->concludesOn();
}
public function concludesAfter(): ?int {
public function concludesAfter(): int|null {
return !empty($this->dates) ? count($this->dates) : null;
}
public function concludesOn(): ?DateTime {
public function concludesOn(): DateTime|null {
if (count($this->dates) > 0) {
return new DateTime(
$this->dates[array_key_last($this->dates)],
+3 -3
View File
@@ -22,7 +22,7 @@ class EventReaderRRule extends \Sabre\VObject\Recur\RRuleIterator {
return $this->interval;
}
public function concludes(): ?DateTime {
public function concludes(): DateTime|null {
// evaluate if until value is a date
if ($this->until instanceof DateTimeInterface) {
return DateTime::createFromInterface($this->until);
@@ -48,11 +48,11 @@ class EventReaderRRule extends \Sabre\VObject\Recur\RRuleIterator {
return null;
}
public function concludesAfter(): ?int {
public function concludesAfter(): int|null {
return !empty($this->count) ? $this->count : null;
}
public function concludesOn(): ?DateTime {
public function concludesOn(): DateTime|null {
return isset($this->until) ? DateTime::createFromInterface($this->until) : null;
}
@@ -97,17 +97,17 @@ class PublishPlugin extends ServerPlugin {
public function propFind(PropFind $propFind, INode $node) {
if ($node instanceof Calendar) {
$propFind->handle('{' . self::NS_CALENDARSERVER . '}publish-url', function () use ($node) {
$propFind->handle('{'.self::NS_CALENDARSERVER.'}publish-url', function () use ($node) {
if ($node->getPublishStatus()) {
// We return the publish-url only if the calendar is published.
$token = $node->getPublishStatus();
$publishUrl = $this->urlGenerator->getAbsoluteURL($this->server->getBaseUri() . 'public-calendars/') . $token;
$publishUrl = $this->urlGenerator->getAbsoluteURL($this->server->getBaseUri().'public-calendars/').$token;
return new Publisher($publishUrl, true);
}
});
$propFind->handle('{' . self::NS_CALENDARSERVER . '}allowed-sharing-modes', function () use ($node) {
$propFind->handle('{'.self::NS_CALENDARSERVER.'}allowed-sharing-modes', function () use ($node) {
$canShare = (!$node->isSubscription() && $node->canWrite());
$canPublish = (!$node->isSubscription() && $node->canWrite());
@@ -160,7 +160,7 @@ class PublishPlugin extends ServerPlugin {
switch ($documentType) {
case '{' . self::NS_CALENDARSERVER . '}publish-calendar':
case '{'.self::NS_CALENDARSERVER.'}publish-calendar':
// We can only deal with IShareableCalendar objects
if (!$node instanceof Calendar) {
@@ -195,7 +195,7 @@ class PublishPlugin extends ServerPlugin {
// Breaking the event chain
return false;
case '{' . self::NS_CALENDARSERVER . '}unpublish-calendar':
case '{'.self::NS_CALENDARSERVER.'}unpublish-calendar':
// We can only deal with IShareableCalendar objects
if (!$node instanceof Calendar) {
+2 -2
View File
@@ -44,12 +44,12 @@ class Backend {
*/
public function getRemindersToProcess():array {
$query = $this->db->getQueryBuilder();
$query->select(['cr.id', 'cr.calendar_id','cr.object_id','cr.is_recurring','cr.uid','cr.recurrence_id','cr.is_recurrence_exception','cr.event_hash','cr.alarm_hash','cr.type','cr.is_relative','cr.notification_date','cr.is_repeat_based','co.calendardata', 'c.displayname', 'c.principaluri'])
$query->select(['cr.*', 'co.calendardata', 'c.displayname', 'c.principaluri','cr.notification_date', 'cr.event_hash', 'cr.type'])
->from('calendar_reminders', 'cr')
->where($query->expr()->lte('cr.notification_date', $query->createNamedParameter($this->timeFactory->getTime())))
->join('cr', 'calendarobjects', 'co', $query->expr()->eq('cr.object_id', 'co.id'))
->join('cr', 'calendars', 'c', $query->expr()->eq('cr.calendar_id', 'c.id'))
->groupBy('cr.event_hash', 'cr.notification_date', 'cr.type', 'cr.id', 'cr.calendar_id', 'cr.object_id', 'cr.is_recurring', 'cr.uid', 'cr.recurrence_id', 'cr.is_recurrence_exception', 'cr.alarm_hash', 'cr.is_relative', 'cr.is_repeat_based', 'co.calendardata', 'c.displayname', 'c.principaluri');
->groupBy('cr.event_hash', 'cr.notification_date', 'cr.type');
$stmt = $query->execute();
return array_map(
@@ -446,7 +446,7 @@ class ReminderService {
private function writeRemindersToDatabase(array $reminders): void {
$uniqueReminders = [];
foreach ($reminders as $reminder) {
$key = $reminder['notification_date'] . $reminder['event_hash'] . $reminder['type'];
$key = $reminder['notification_date']. $reminder['event_hash'].$reminder['type'];
if (!isset($uniqueReminders[$key])) {
$uniqueReminders[$key] = $reminder;
}
+1 -2
View File
@@ -17,8 +17,7 @@ use Psr\Log\LoggerInterface;
class Backend extends SharingBackend {
public function __construct(
private IUserManager $userManager,
public function __construct(private IUserManager $userManager,
private IGroupManager $groupManager,
private Principal $principalBackend,
private ICacheFactory $cacheFactory,
+1 -3
View File
@@ -13,9 +13,7 @@ use OCA\DAV\DAV\Sharing\SharingService;
class Service extends SharingService {
protected string $resourceType = 'calendar';
public function __construct(
protected SharingMapper $mapper,
) {
public function __construct(protected SharingMapper $mapper) {
parent::__construct($mapper);
}
}
+2 -4
View File
@@ -27,15 +27,13 @@ use Sabre\CalDAV\Xml\Property\ScheduleCalendarTransp;
class StatusService {
private ICache $cache;
public function __construct(
private ITimeFactory $timeFactory,
public function __construct(private ITimeFactory $timeFactory,
private IManager $calendarManager,
private IUserManager $userManager,
private UserStatusService $userStatusService,
private IAvailabilityCoordinator $availabilityCoordinator,
private ICacheFactory $cacheFactory,
private LoggerInterface $logger,
) {
private LoggerInterface $logger) {
$this->cache = $cacheFactory->createLocal('CalendarStatusService');
}
+2 -4
View File
@@ -20,11 +20,9 @@ use function array_reduce;
class TimezoneService {
public function __construct(
private IConfig $config,
public function __construct(private IConfig $config,
private PropertyMapper $propertyMapper,
private IManager $calendarManager,
) {
private IManager $calendarManager) {
}
public function getUserTimezone(string $userId): ?string {
@@ -72,7 +72,7 @@ class DeletedCalendarObject implements IACL, ICalendarObject, IRestorable {
public function getContentType() {
$mime = 'text/calendar; charset=utf-8';
if (isset($this->objectData['component']) && $this->objectData['component']) {
$mime .= '; component=' . $this->objectData['component'];
$mime .= '; component='.$this->objectData['component'];
}
return $mime;
+2 -4
View File
@@ -13,15 +13,13 @@ use JsonSerializable;
use OCA\DAV\ResponseDefinitions;
class UpcomingEvent implements JsonSerializable {
public function __construct(
private string $uri,
public function __construct(private string $uri,
private ?int $recurrenceId,
private string $calendarUri,
private ?int $start,
private ?string $summary,
private ?string $location,
private ?string $calendarAppUrl,
) {
private ?string $calendarAppUrl) {
}
public function getUri(): string {
@@ -17,13 +17,11 @@ use OCP\IUserManager;
use function array_map;
class UpcomingEventsService {
public function __construct(
private IManager $calendarManager,
public function __construct(private IManager $calendarManager,
private ITimeFactory $timeFactory,
private IUserManager $userManager,
private IAppManager $appManager,
private IURLGenerator $urlGenerator,
) {
private IURLGenerator $urlGenerator) {
}
/**
@@ -19,7 +19,7 @@ use Sabre\HTTP\ResponseInterface;
class CalDavValidatePlugin extends ServerPlugin {
public function __construct(
private IAppConfig $config,
private IAppConfig $config
) {
}
@@ -21,11 +21,9 @@ use Sabre\DAV\Xml\Property\Href;
use Sabre\VObject\Reader;
class Connection {
public function __construct(
private IClientService $clientService,
public function __construct(private IClientService $clientService,
private IAppConfig $config,
private LoggerInterface $logger,
) {
private LoggerInterface $logger) {
}
/**
@@ -30,12 +30,10 @@ class RefreshWebcalService {
public const STRIP_ATTACHMENTS = '{http://calendarserver.org/ns/}subscribed-strip-attachments';
public const STRIP_TODOS = '{http://calendarserver.org/ns/}subscribed-strip-todos';
public function __construct(
private CalDavBackend $calDavBackend,
public function __construct(private CalDavBackend $calDavBackend,
private LoggerInterface $logger,
private Connection $connection,
private ITimeFactory $time,
) {
private ITimeFactory $time) {
}
public function refreshSubscription(string $principalUri, string $uri) {
@@ -8,7 +8,6 @@ declare(strict_types=1);
*/
namespace OCA\DAV\CardDAV\Activity\Provider;
use OCP\Activity\Exceptions\UnknownActivityException;
use OCP\Activity\IEvent;
use OCP\Activity\IEventMerger;
use OCP\Activity\IManager;
@@ -53,11 +52,11 @@ class Addressbook extends Base {
* @param IEvent $event
* @param IEvent|null $previousEvent
* @return IEvent
* @throws UnknownActivityException
* @throws \InvalidArgumentException
*/
public function parse($language, IEvent $event, ?IEvent $previousEvent = null): IEvent {
if ($event->getApp() !== 'dav' || $event->getType() !== 'contacts') {
throw new UnknownActivityException();
throw new \InvalidArgumentException();
}
$l = $this->languageFactory->get('dav', $language);
@@ -103,7 +102,7 @@ class Addressbook extends Base {
} elseif ($event->getSubject() === self::SUBJECT_UNSHARE_GROUP . '_by') {
$subject = $l->t('{actor} unshared address book {addressbook} from group {group}');
} else {
throw new UnknownActivityException();
throw new \InvalidArgumentException();
}
$parsedParameters = $this->getParameters($event, $l);
@@ -8,7 +8,6 @@ declare(strict_types=1);
*/
namespace OCA\DAV\CardDAV\Activity\Provider;
use OCP\Activity\Exceptions\UnknownActivityException;
use OCP\Activity\IEvent;
use OCP\Activity\IEventMerger;
use OCP\Activity\IManager;
@@ -55,11 +54,11 @@ class Card extends Base {
* @param IEvent $event
* @param IEvent|null $previousEvent
* @return IEvent
* @throws UnknownActivityException
* @throws \InvalidArgumentException
*/
public function parse($language, IEvent $event, ?IEvent $previousEvent = null): IEvent {
if ($event->getApp() !== 'dav' || $event->getType() !== 'contacts') {
throw new UnknownActivityException();
throw new \InvalidArgumentException();
}
$l = $this->languageFactory->get('dav', $language);
@@ -83,7 +82,7 @@ class Card extends Base {
} elseif ($event->getSubject() === self::SUBJECT_UPDATE . '_self') {
$subject = $l->t('You updated contact {card} in address book {addressbook}');
} else {
throw new UnknownActivityException();
throw new \InvalidArgumentException();
}
$parsedParameters = $this->getParameters($event, $l);
@@ -25,14 +25,12 @@ use function explode;
class CardDavRateLimitingPlugin extends ServerPlugin {
private ?string $userId;
public function __construct(
private Limiter $limiter,
public function __construct(private Limiter $limiter,
private IUserManager $userManager,
private CardDavBackend $cardDavBackend,
private LoggerInterface $logger,
private IAppConfig $config,
?string $userId,
) {
?string $userId) {
$this->limiter = $limiter;
$this->userManager = $userManager;
$this->cardDavBackend = $cardDavBackend;
+1 -2
View File
@@ -16,8 +16,7 @@ use OCP\IUserManager;
use Psr\Log\LoggerInterface;
class Backend extends SharingBackend {
public function __construct(
private IUserManager $userManager,
public function __construct(private IUserManager $userManager,
private IGroupManager $groupManager,
private Principal $principalBackend,
private ICacheFactory $cacheFactory,
+1 -3
View File
@@ -13,9 +13,7 @@ use OCA\DAV\DAV\Sharing\SharingService;
class Service extends SharingService {
protected string $resourceType = 'addressbook';
public function __construct(
protected SharingMapper $mapper,
) {
public function __construct(protected SharingMapper $mapper) {
parent::__construct($mapper);
}
}
@@ -19,7 +19,7 @@ use Sabre\HTTP\ResponseInterface;
class CardDavValidatePlugin extends ServerPlugin {
public function __construct(
private IAppConfig $config,
private IAppConfig $config
) {
}
@@ -1,78 +0,0 @@
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
namespace OCA\DAV\Command;
use OCA\DAV\CalDAV\CalDavBackend;
use OCA\Theming\ThemingDefaults;
use OCP\IUserManager;
use Sabre\DAV\Xml\Property\Href;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class CreateSubscription extends Command {
public function __construct(
protected IUserManager $userManager,
private CalDavBackend $caldav,
private ThemingDefaults $themingDefaults,
) {
parent::__construct();
}
protected function configure(): void {
$this
->setName('dav:create-subscription')
->setDescription('Create a dav subscription')
->addArgument('user',
InputArgument::REQUIRED,
'User for whom the subscription will be created')
->addArgument('name',
InputArgument::REQUIRED,
'Name of the subscription to create')
->addArgument('url',
InputArgument::REQUIRED,
'Source url of the subscription to create')
->addArgument('color',
InputArgument::OPTIONAL,
'Hex color code for the calendar color');
}
protected function execute(InputInterface $input, OutputInterface $output): int {
$user = $input->getArgument('user');
if (!$this->userManager->userExists($user)) {
$output->writeln("<error>User <$user> in unknown.</error>");
return self::FAILURE;
}
$name = $input->getArgument('name');
$url = $input->getArgument('url');
$color = $input->getArgument('color') ?? $this->themingDefaults->getColorPrimary();
$subscriptions = $this->caldav->getSubscriptionsForUser("principals/users/$user");
$exists = array_filter($subscriptions, function ($row) use ($url) {
return $row['source'] === $url;
});
if (!empty($exists)) {
$output->writeln("<error>Subscription for url <$url> already exists for this user.</error>");
return self::FAILURE;
}
$urlProperty = new Href($url);
$properties = ['{http://owncloud.org/ns}calendar-enabled' => 1,
'{DAV:}displayname' => $name,
'{http://apple.com/ns/ical/}calendar-color' => $color,
'{http://calendarserver.org/ns/}source' => $urlProperty,
];
$this->caldav->createSubscription("principals/users/$user", $name, $properties);
return self::SUCCESS;
}
}
+1 -1
View File
@@ -54,7 +54,7 @@ class DeleteCalendar extends Command {
protected function execute(
InputInterface $input,
OutputInterface $output,
OutputInterface $output
): int {
/** @var string $user */
$user = $input->getArgument('uid');
@@ -20,10 +20,8 @@ use Symfony\Component\Console\Output\OutputInterface;
class FixCalendarSyncCommand extends Command {
public function __construct(
private IUserManager $userManager,
private CalDavBackend $calDavBackend,
) {
public function __construct(private IUserManager $userManager,
private CalDavBackend $calDavBackend) {
parent::__construct('dav:fix-missing-caldav-changes');
}
+2 -2
View File
@@ -55,7 +55,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties {
IComment $comment,
IUserManager $userManager,
IUserSession $userSession,
LoggerInterface $logger,
LoggerInterface $logger
) {
$this->commentsManager = $commentsManager;
$this->comment = $comment;
@@ -69,7 +69,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties {
if ($getter === 'getMentions') {
continue; // special treatment
}
$name = '{' . self::NS_OWNCLOUD . '}' . lcfirst(substr($getter, 3));
$name = '{'.self::NS_OWNCLOUD.'}' . lcfirst(substr($getter, 3));
$this->properties[$name] = $getter;
}
$this->userManager = $userManager;
+1 -1
View File
@@ -216,7 +216,7 @@ class CommentsPlugin extends ServerPlugin {
}
}
if (is_null($actorId)) {
throw new BadRequest('Invalid actor "' . $actorType . '"');
throw new BadRequest('Invalid actor "' . $actorType .'"');
}
try {
+1 -1
View File
@@ -46,7 +46,7 @@ class EntityCollection extends RootCollection implements IProperties {
ICommentsManager $commentsManager,
IUserManager $userManager,
IUserSession $userSession,
LoggerInterface $logger,
LoggerInterface $logger
) {
foreach (['id', 'name'] as $property) {
$$property = trim($$property);
@@ -38,7 +38,7 @@ class EntityTypeCollection extends RootCollection {
IUserManager $userManager,
IUserSession $userSession,
LoggerInterface $logger,
\Closure $childExistsFunction,
\Closure $childExistsFunction
) {
$name = trim($name);
if (empty($name)) {
@@ -80,7 +80,7 @@ class CommentPropertiesPlugin extends ServerPlugin {
*/
public function handleGetProperties(
PropFind $propFind,
\Sabre\DAV\INode $node,
\Sabre\DAV\INode $node
) {
if (!($node instanceof File) && !($node instanceof Directory)) {
return;

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