Commit Graph

178 Commits (5b6a0affd01f2093a4e2fdbbc916ea8935f65166)

Author SHA1 Message Date
Anna Larch 5b6a0affd0 Allow reimporting prev. deleted items by deleting trashbin item
Signed-off-by: Anna Larch <anna@nextcloud.com>
2023-02-13 15:00:23 +07:00
Côme Chilliet c4d90f3e81
Removed catch of ValueError as we cannot know if it’s >2038 or <1970
Also fixed numericToString to correctly convert float to int if it fits

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:35 +07:00
Côme Chilliet d315bce300
Improve behavior with dates on 32bits and fix tests or skip them
We do not support events after 2038 on 32bits but still behave better
 when date range start/end is after 2038.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:32 +07:00
Joas Schilling 1a31ddb56d
Do not reuse query builder objects in DAV account deletion
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-02-01 21:49:34 +07:00
Anna Larch e5c290bb7f Switch to DisplayNameCache for CalDAV
Signed-off-by: Anna Larch <anna@nextcloud.com>
2022-11-03 10:26:34 +07:00
Thomas Citharel 6f15873321 Add a background job to prune outdated sync tokens
We remove all outdated sync tokens, based on their auto-incremented ID.

By default we only keep the last 10 000, but this can be configurable.

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-10-27 20:12:13 +07:00
Christoph Wurst e6d8da4cdc Fix causal reads in CalDAV backend
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-10-03 20:03:29 +07:00
Anna Larch b044c7586b
Check calendar URI length before creation
Signed-off-by: Anna Larch <anna@nextcloud.com>
2022-08-26 13:57:43 +07:00
Anna Larch 4ca4b02793 Support iMIP invitations from Mail
Signed-off-by: Anna Larch <anna@nextcloud.com>
2022-08-22 22:10:12 +07:00
luz paz d4637ef4d8 Fix typos in apps/dav subdirectory
Found via `codespell -q 3 -S l10n -L jus ./apps/dav`

Signed-off-by: luz paz <luzpaz@github.com>
2022-07-26 17:40:10 +07:00
Carl Schwan 3598ec4028 Add typing to Sharing Backend
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-06-22 10:25:17 +07: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 +07: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 +07: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 +07:00
Thomas Citharel 060c8d7c4b
Add some typed properties
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-05-17 15:09:49 +07: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 +07: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 +07:00
Christoph Wurst 288f07a5a4 Fix CalDAV subscriptions calendarorder column/prop type
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-03-24 17:42:03 +07:00
Christoph Wurst 941e560b5e Fix column/property type of the calendar order
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-03-24 17:42:03 +07:00
Christoph Wurst 4f33b6937b Fix column/property type of the CalDAV deleted_at time stamp
The timestamp is an int, but we treated it as string. With this patch
the property map is enriched with types and settype casts the value if
necessary.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-03-24 17:42:03 +07:00
Anna Larch 0745fc5012 Move calendar objects between calendars instead of deleting and recreating them
Signed-off-by: Anna Larch <anna@nextcloud.com>
2022-03-16 12:48:50 +07:00
Christoph Wurst b005846d1f
Carefully filter out non matching time ranges for CalDAV search
When we search for CalDAV objects in the DB we take the first and last
occurence into account. For recurring events that is when they take
place the very first time and the very last time. Searching in a more
specific time range will still match this condition, because the
recurring event starts before the end of the requested range but ends
after the start of the requested range.

Sabre has filters for this. If we apply them on all seach objects of a
search with a time range, then only the recurring events actually taking
place at the time of the requested time range will be returned.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-12-13 15:58:31 +07:00
Christoph Wurst 98d4aefe43
Close open cursor in the caldav back-end
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-12-02 14:23:59 +07:00
Christoph Wurst ca14c02301
Document and type allowed values for calendar property searches
For API users it looked like any properties could be searched. But it
turned out to be a hand picked list of properties that we index and then
use for the search. To prevent application errors where special props
are not found, I suggest we document and type the allowed values.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-11-11 10:57:04 +07:00
Christoph Wurst 2956f1c017
Fix immutable datetime handling in DAV calendar search
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-10-28 19:45:39 +07:00
Anna Larch a58d1e6b06
Add Public Calendar Provider
Signed-off-by: Anna Larch <anna@nextcloud.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-10-14 08:22:24 +07:00
Richard Steinmetz 09ad1c4e2b
Skip deleted calendar objects of deleted calendars
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2021-06-15 11:36:59 +07:00
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Christoph Wurst ff2a730aac
Fix loading of delete caldav objet URIs
Regression of 462962197d

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-05-31 21:01:54 +07:00
Christoph Wurst 462962197d
Expose calendar-uri as property of deleted caldav events
The trashbin is one report across all calendars of a user. In order to
refresh the data of a single calendar when one of its events is
restored, we need to know what calendar the event belongs to. There
doesn't seem to be a standard property for a URI, so this adds a custom
Nextcloud prop for the calendar-uri.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-05-31 18:57:40 +07:00
Thomas Citharel 8a73b180e7
Get componenttype from the db as well when restoring a calendarobject
It's needed in ReminderService::onCalendarObjectCreate()

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2021-05-31 07:49:19 +07:00
Christoph Wurst d6d8e9215c
Add a trashbin for calendars and calendar objects
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-05-31 07:49:19 +07:00
Christoph Wurst cebe951b8e
Remove the untyped calendar update event
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-05-07 17:09:37 +07:00
Christoph Wurst 884e34b12a
Remove the untyped calendar create event
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-05-07 16:58:33 +07:00
Christoph Wurst f8c519f5f0
Merge pull request #26913 from nextcloud/chore/dav-calendar-object-untyped-events
Drop some more untyped events from the dav code
2021-05-07 16:47:44 +07:00
Christoph Wurst 257613e6ef
Remove the \OCA\DAV\CalDAV\CalDavBackend::createCalendarObject event
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-05-07 12:13:45 +07:00
Christoph Wurst f808267949
Remove the \OCA\DAV\CalDAV\CalDavBackend::updateCalendarObject event
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-05-07 12:10:58 +07:00
Christoph Wurst 08a4b24926
Drop the unused second parameter on \OCA\DAV\CalDAV\CalDavBackend::getShares
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-05-07 11:57:31 +07:00
Christoph Wurst d512a5629e
Remove the \OCA\DAV\CalDAV\CalDavBackend::deleteCalendarObject event
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-05-07 10:53:45 +07:00
Christoph Wurst 99f2fa73d1
Fix usage of rename executeUpdate
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-05-05 10:35:25 +07:00
Christoph Wurst 63eb3694e4
Exclusively use the typed calendar deletion events for DAV
We had both in places, but the old one isn't used anywhere outside this
app, so it's time to migrate the code.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-04-29 15:31:19 +07:00
Chih-Hsuan Yen fea5b4a8b9
Correctly truncate multibyte strings to fit into the database
Closes: #26174

Signed-off-by: Chih-Hsuan Yen <yan12125@gmail.com>
2021-04-26 16:54:50 +07:00
Christoph Wurst 323f95693c
Close open cursors
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-04-23 14:35:02 +07:00
Christoph Wurst 72a4f21efe
Use the new executeQuery and executeUpdate methods
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-04-23 13:21:25 +07:00
Christoph Wurst 94bf14a8dc
Drop default fetch mode parameter
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-04-23 13:21:25 +07:00
dependabot-preview[bot] eb502c02ff
Bump nextcloud/coding-standard from 0.3.0 to 0.5.0
Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0.
- [Release notes](https://github.com/nextcloud/coding-standard/releases)
- [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-02-18 13:31:24 +07:00
Roeland Jago Douma df4c2508d6 Fix some RedundantCast in dav code
For #25641

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-02-15 20:50:28 +07:00
Roeland Jago Douma b0f205f97c Move getChangesForCalendar to QueryBuilder
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-02-15 12:07:26 +07:00
Christoph Wurst 8b64e92b92
Bump doctrine/dbal from 2.12.0 to 3.0.0
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-01-08 11:45:19 +07:00
John Molakvoæ (skjnldsv) 07553f0c62
Make sure we have existing indexes before using them
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-01-04 20:58:15 +07:00