aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CalDAV/CalDavBackend.php
Commit message (Collapse)AuthorAgeFilesLines
* chore: adjust code to adhere to coding standardAnna Larch2024-09-051-4/+4
| | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-251-49/+49
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* fix(caldav): limit property lengthAnna Larch2024-08-221-1/+1
| | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* Merge pull request #46723 from ↵Richard Steinmetz2024-08-141-0/+76
|\ | | | | | | | | nextcloud/feat/add-delta-sync-to-subscription-calendars feat(webcal): only update modified and deleted events from webcal calendars
| * feat(webcal): only update modified and deleted events from webcal calendarsAnna Larch2024-08-131-0/+76
| | | | | | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* | fix(caldav): allow VJOURNAL if no supported component set is specifiedRichard Steinmetz2024-08-131-1/+1
|/ | | | | | This is mandated by the RFCs. Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
* fix(caldav): fixed initial sync and double processingSebastianKrupinski2024-08-011-58/+41
| | | | Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
* fix(db): Deprecate `IExpressionBuilder::or()` and ↵Joas Schilling2024-07-191-30/+34
| | | | | | `IExpressionBuilder::and()` without parameters Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix(caldav): Throw 403 Forbidden Error instead of 500 Internal Server ErrorSebastianKrupinski2024-07-171-1/+10
| | | | Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
* fix(caldav): automatically delete outdated scheduling objectsAnna Larch2024-05-311-0/+38
| | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* feat(caldav): order the calendar objects by start date for searchDaniel Kesselberg2024-05-281-1/+17
| | | | | | Sorting the events by the start date leads to more predictable results for the search API consumers. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* fix(caldav): event search with limit and timerangeDaniel Kesselberg2024-05-281-51/+105
| | | | | | | | | | | | | Event recurrences are evaluated at runtime because the database only knows the first and last occurrence. Given, a user created 8 events with a yearly reoccurrence and two for events tomorrow. The upcoming event widget asks the CalDAV backend for 7 events within the next 14 days. If limit 7 is applied to the SQL query, we find the 7 events with a yearly reoccurrence and discard the events after evaluating the reoccurrence rules because they are not due within the next 14 days and end up with an empty result even if there are two events to show. The workaround for search requests with a limit and time range is asking for more row than requested and retrying if we have not reached the limit. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* chore: Add SPDX headerAndy Scherzinger2024-05-271-36/+3
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* feat(caldav): expose calendar subscriptionsDaniel Kesselberg2024-05-071-1/+7
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* fix: Fix new psalm errors from updateCôme Chilliet2024-04-081-1/+1
| | | | | | | Not sure about the SimpleContainer modification, let’s see what CI says about that. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: Apply new coding standard to all filesCôme Chilliet2024-04-021-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(dav): Add retention time to sync token cleanupChristoph Wurst2024-03-211-2/+6
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* fix(dav): Add occ command to fix missing caldav sync tokensChristoph Wurst2024-03-121-16/+59
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* fix(dav): Fix atomic calendar/subscription updatesChristoph Wurst2024-02-291-40/+43
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Bug fix: Select the correct table based on CALENDAR_TYPE_CALENDARPatrick Fischer2024-02-231-2/+4
| | | | Signed-off-by: Patrick Fischer <mail@patrickfischer.ch>
* fix(dav): Rate limit calendar/subscription creationChristoph Wurst2024-02-231-0/+21
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* enh(sharing): enable unsharing for sharees for DAV shares (addressbooks and ↵Anna Larch2024-02-151-18/+25
| | | | | | calendars) Signed-off-by: Anna Larch <anna@nextcloud.com>
* fix(caldav): don't reuse query builder objectsAnna Larch2023-12-111-0/+2
| | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* feat(caldav): Allow advanced search for events/tasksBenjamin Gaussorgues2023-11-101-33/+40
| | | | Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* fix(dav): Reduce CalDAV backend memory footprintChristoph Wurst2023-11-021-30/+34
| | | | | | | fetchAll inflates memory. Fetching in a loop allows GC to run earlier and more often. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* fix(dav): expand recurrences when searchingRichard Steinmetz2023-09-211-1/+12
| | | | Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
* Merge pull request #39568 from nextcloud/caldav-share-preloadRobin Appelman2023-08-141-5/+34
|\ | | | | Calendar optimizations
| * cache calendar objects from calendarQueryRobin Appelman2023-07-261-5/+30
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * preload shares for calendars when listing calendarsRobin Appelman2023-07-261-0/+4
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | ensure outerquery ->where() function doesn't clobber earier ->andWhere()Jamie McClelland2023-08-071-4/+4
| | | | | | | | Signed-off-by: Jamie McClelland <jm@mayfirst.org>
* | optimize calendar search queryJamie McClelland2023-08-071-1/+1
|/ | | | | | see https://github.com/nextcloud/calendar/issues/4758 Signed-off-by: Jamie McClelland <jm@mayfirst.org>
* Merge pull request #39297 from nextcloud/fix/dav/close-cursorJoas Schilling2023-07-121-1/+3
|\ | | | | fix(dav): close cursor when fetching max id
| * fix(dav): close cursor when fetching max idRichard Steinmetz2023-07-111-1/+3
| | | | | | | | Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
* | fix(dav): Move DAV app to non deprecated event dispatcherJoas Schilling2023-07-071-1/+1
|/ | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* style(caldav): improve getDenormalizedData methodThomas Citharel2023-06-271-2/+2
| | | | Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* Fix creating events with old (< unix time) lastoccurenceThomas Citharel2023-06-271-1/+1
| | | | | | Closes #20804 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* Issue #36644: Fix pruneOutdatedSyncTokens for CalDAVChristof Arnosti2023-06-121-2/+11
| | | | | | | pruneOutdatedSyncTokens accidentally deletes all entries of the calendarchanges table instead of leaving $limit elements in the table Signed-off-by: Christof Arnosti <charno@charno.ch>
* fix event move issueMaximilian Martin2023-04-181-2/+2
| | | | Signed-off-by: Maximilian Martin <maximilian_martin@gmx.de>
* refactor(dav): Since we're in a transaction, use QB properly when ↵Thomas Citharel2023-04-171-7/+8
| | | | | | | | incrementing synctoken Now that we're in a transaction, we can reuse the sync token's previous value without trouble, and rewrite the increment UPDATE query without dirty direct SQL. Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* fix(CalDAV/CardDAV): put every method from Cal/CardDAV backends that does ↵Thomas Citharel2023-04-171-870/+911
| | | | | | | | | | | | multiple DB calls in transactions In a lot of methods we're doing read-after-writes (for instance calling updateProperties after touching calendar objects). There's also a lot of deleting methods that do stuff sequentially which could cause trouble. This should avoid this kind of issues. Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* Merge pull request #34375 from nextcloud/fix/trashbin-uidDaniel2023-02-211-4/+6
|\ | | | | fix(dav) Handle Calendar trashbin UID conflicts by removing the deleted calendar object
| * Allow reimporting prev. deleted items by deleting trashbin itemAnna Larch2023-02-131-4/+6
| | | | | | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* | fix(caldav): Fix reminder timezone drift for all-day eventsChristoph Wurst2023-02-091-1/+1
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Removed catch of ValueError as we cannot know if it’s >2038 or <1970Côme Chilliet2023-02-071-11/+2
| | | | | | Also fixed numericToString to correctly convert float to int if it fits Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Improve behavior with dates on 32bits and fix tests or skip themCôme Chilliet2023-02-071-16/+23
| | | | | | | 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>
* Do not reuse query builder objects in DAV account deletionJoas Schilling2023-02-011-2/+2
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Switch to DisplayNameCache for CalDAVAnna Larch2022-11-031-20/+1
| | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* Add a background job to prune outdated sync tokensThomas Citharel2022-10-271-0/+14
| | | | | | | | 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>
* Fix causal reads in CalDAV backendChristoph Wurst2022-10-031-20/+29
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Check calendar URI length before creationAnna Larch2022-08-261-0/+7
| | | | Signed-off-by: Anna Larch <anna@nextcloud.com>