Commit graph

1698 commits

Author SHA1 Message Date
blizzz
33148016a5
Merge pull request #32876 from nextcloud/fix/fix-string-interpolation
Use {$var} instead of ${var} for PHP 8.2 compatibility
2022-06-15 21:39:56 +02:00
Côme Chilliet
c54fb5f9e6
Use {$var} instead of ${var} for PHP 8.2 compatibility
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-06-14 15:12:28 +02:00
Thomas Citharel
39ef0500d1
Handle the move operation properly between shared calendars
- Introduce a new CalendarObjectMovedEvent typed event dedicated for
  this operation
- Handle the event in the activity backend and add new appropriate activity subjects

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-06-14 14:40:24 +02:00
Vincent Petry
2ee948e8d1
Merge pull request #30368 from nextcloud/dav-allow-object-properties
Allow DAV Object properties
2022-06-10 17:07:38 +02:00
Vincent Petry
804ee11803
Merge pull request #31029 from nextcloud/expose-extra-emails-in-dav
Expose additional emails in {DAV:}alternate-URI-set
2022-06-10 16:56:37 +02:00
Vincent Petry
5f8e1b7fb9
Merge pull request #31622 from nextcloud/increase-loglevel-modernize-refresh-webcal
Increase loglevel of Webcal parsing errors and modernize code
2022-06-10 16:31:51 +02:00
Vincent Petry
dcfdcf991f
Merge pull request #32361 from nextcloud/dav-scheduling-default-calendar
Put calendar invites into the user's first available calendar
2022-06-10 16:03:09 +02:00
Vincent Petry
8e61671b82
Merge pull request #32364 from nextcloud/dav-listeners
🧹 Remove all legacy event dispatchers from CalDAV & CardDAV backends
2022-06-10 15:57:35 +02:00
Vincent Petry
08655a1497
Merge pull request #32800 from nextcloud/bugfix/noid/no-fatal-for-maintenance-mode
Don't spam the log with fatals when maintenance mode is enabled or an…
2022-06-10 15:02:37 +02:00
Thomas Citharel
c6c3fd9aa9
Avoid creating carddav activities for the system user
Because of the system addressbook synchronisation.

Closes #32803

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-06-10 09:07:53 +02:00
Joas Schilling
8e3b30f388
Don't spam the log with fatals when maintenance mode is enabled or an upgrade has to be done
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-06-10 00:36:52 +02:00
Christoph Wurst
ca45e6a064
Merge pull request #28703 from nextcloud/enhancement/caldav-reminders-logging
Debug log what happens during reminders processing
2022-06-02 14:29:58 +02:00
Christopher Ng
57c66bf7cb Use Image class from public API
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-06-02 00:37:36 +00:00
Christoph Wurst
4e5ed32025
Merge pull request #32471 from nextcloud/fix-wrong-dav-activities
Make sure activities are not created when a deleted calendar object expires
2022-06-01 17:01:58 +02:00
Christoph Wurst
58f7a150ed
Debug log what happens during reminders processing
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-06-01 11:38:02 +02:00
Carl Schwan
1b426eda44 Make X-HAS-{MD5/SHA256} opt-in
This is not always needed and slow down the upload

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-06-01 10:59:04 +02:00
Christopher Ng
aaedc95e81 Update calendar estimation
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-05-30 22:48:15 +00:00
Christopher Ng
9fbbbc7ca6 Update contacts estimation
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-05-30 17:49:05 +00:00
Christopher Ng
432bc9a585 Update method name
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2022-05-30 17:49:05 +00:00
Côme Chilliet
6da413f7af Move new IMigrator method to a specific interface ISizeEstimationMigrator
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-05-30 07:36:13 +00:00
Côme Chilliet
09917b8583 Implement getExportEstimatedSize in migrators
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-05-30 07:36:13 +00:00
Joas Schilling
95f390d368
Merge pull request #32580 from nextcloud/bugfix/noid/fix-handling-events-without-name
Fix handling events without names in activities
2022-05-25 09:11:05 +02:00
Joas Schilling
2c670f9cf9
Also trim the name
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-05-25 08:06:32 +02:00
Carl Schwan
d6158c8aea
Merge pull request #32548 from nextcloud/fix/return-type
Fix return type and make type stricter
2022-05-24 20:46:23 +02:00
Joas Schilling
ba684f5c58
Fix handling events without names in activities
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-05-24 17:04:56 +02:00
Carl Schwan
3ada267a02 Fix return type and make type stricter
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-24 12:05:17 +02:00
Thomas Citharel
424fc1b736
Rename user-agent used by the Webcal Refresh Service
Some services don't like the "crawler" inside the previous user-agent.

Closes https://github.com/nextcloud/calendar/issues/4232

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-05-20 16:23:40 +02:00
Thomas Citharel
cf8b98bf5f
Make sure activities are not created when a deleted calendar object expires
Closes https://github.com/nextcloud/activity/issues/784

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-05-18 11:17:27 +02:00
Anna Larch
440f69bd69
Add email validation
Signed-off-by: Anna Larch <anna@nextcloud.com>
2022-05-18 07:54:30 +02:00
Thomas Citharel
741c44385f
Increase loglevel of Webcal parsing errors and modernize code
Closes #31612

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-05-17 15:11:58 +02:00
Thomas Citharel
190a71ecf9
Expose additional emails in {DAV:}alternate-URI-set
This allows iMip invitations to be send with an alternative email as
"Reply-To" field.

Closes #27201

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-05-17 15:11:36 +02:00
Thomas Citharel
28b0da59ce
Fix a doctype in OCP for IAddressBook
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-05-17 15:09:49 +02:00
Thomas Citharel
060c8d7c4b
Add some typed properties
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-05-17 15:09:49 +02:00
Thomas Citharel
4bb31c021e
Remove all legacy event dispatchers from CalDAV & CardDAV backends
Move them to proper EventListeners and test them

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-05-17 15:09:46 +02:00
Carl Schwan
07c9bf1adf
Merge pull request #31943 from nextcloud/dav-cleanup
Cleanup dav
2022-05-17 14:59:59 +02:00
Thomas Citharel
bd8b2137e2
Allow DAV Object properties
The current implementation only saves them as string. It seems they can
be more complex than that, and that objects were saved directly.

You may find such objects saved in some production databases by
executing:
```sql
SELECT * from oc_properties where propertyvalue = 'Object';
```

This commit adds a repair job to clean all of these "broken" properties
values, adds a new database column to save the type of the property, and
handles converting from and to correct values.

Implementation is very similar to SabreDAV's own PDO backend: 4921806dfb/sabre/dav/lib/DAV/PropertyStorage/Backend/PDO.php

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-05-16 15:02:00 +02:00
Carl Schwan
f7be76125f Fix more psalm issues
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-16 11:05:54 +02:00
Carl Schwan
e71db40492 Wrap multiple inserts inside a transation
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-12 21:02:53 +02:00
Carl Schwan
eef973e85b Minor optimizations for saving user personal information
* Remove double hook: the OC_User::changeUser triggers an
OC\AccountManager::userUpdated and the app is already listening to this
signal in its Application definition

* Make createCard not check if an card exists if we already checked
  previously. We also don't try to get the card if the user is disabled
  as we don't use the card in this case

We this change we go from 100 DB requests to 80 DB requests when saving
an user email address.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
(cherry picked from commit c6fd482edf33214a9ad4787e4cac278f871fa7c8)
2022-05-12 21:02:52 +02:00
Thomas Citharel
8d7154318f
Put calendar invites into the user's first available calendar
If there's no default calendar and we can't find anything with URI
'personal', instead of creating a new one, start by using the first
"real personal calendar" available.

If not, then we create the default one.

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-05-12 15:28:36 +02:00
Carl Schwan
829490ab7a Cleanup dav
- Remove unused class AppEnabledPlugin
- Add more type hinting when possible

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-05 22:03:59 +02:00
Carl Schwan
645bc022e2
Merge pull request #32262 from nextcloud/fix/noid/extra-leading-minus
Remove leading "minus"
2022-05-04 13:48:54 +02:00
Louis
7ccfddbe64
Merge pull request #31963 from nextcloud/feat/use_setting_in_dav_search
Use share setting in DAV search
2022-05-04 13:38:03 +02:00
Julien Veyssier
af8b7835b8
remove leading minus which thankfully crashes because this operand does not apply to PsrLoggerAdapter
Signed-off-by: Julien Veyssier <eneiluj@posteo.net>
2022-05-04 10:51:23 +02:00
Côme Chilliet
3f132d5678
Fix use of $logger from another scope in apps/dav/lib/Server.php
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-05-02 10:52:44 +02:00
Côme Chilliet
771028dada
Add missing use for LoggerInterface
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-05-02 10:52:44 +02:00
Côme Chilliet
5fb9de6248
Migrate last instances of $server::getLogger() from dav
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-05-02 10:52:44 +02:00
Côme Chilliet
e2531f8503
Migrate dav application from ILogger to LoggerInterface
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-05-02 10:52:43 +02:00
Thomas Citharel
5494dd736d
Handle processing reminders for calendar objects with an infinite number
of recurrences

Closes #29896

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-04-27 17:17:22 +02:00
Robin Appelman
54ac585bc5
add logging of failed quota info
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-04-22 15:29:30 +02:00