Joas Schilling
aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +01:00
Christoph Wurst
5cdbd10327
refactor(caldav): Use even earlier return and SQL's WHERE IN
...
* Early return can operate on the input array
* SQL can check be used to check for address book ID inclusion
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-11-15 14:48:55 +01:00
hamza221
26ee5a531b
feat(search): allow contacts person search
...
Signed-off-by: hamza221 <hamzamahjoubi221@gmail.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-11-14 18:29:42 +01:00
Benjamin Gaussorgues
ddb8b68b55
feat(carddav): Allow advanced search for contacts
...
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-10 09:21:16 +01:00
Christoph Wurst
9627176a23
Merge pull request #38610 from fsamapoor/replace_strpos_calls_in_dav_app
...
Refactors "strpos" calls in /apps/dav
2023-09-17 10:14:20 +02:00
Anna Larch
6bd78917d3
fix(CardDAV): set owner-principal, displayname properties for SAB
...
Signed-off-by: Anna Larch <anna@nextcloud.com>
2023-08-16 09:11:01 +02:00
Richard Steinmetz
9206c0f473
fix(dav): close cursor when fetching max id
...
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2023-07-11 08:05:34 +02:00
Faraz Samapoor
bbfe2fb821
Merge branch 'master' into replace_strpos_calls_in_dav_app
...
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
2023-06-27 19:07:09 +03:30
Christof Arnosti
73fb2997f4
Issue #36644 : Fix pruneOutdatedSyncTokens for CalDAV
...
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>
2023-06-12 08:35:35 +00:00
Faraz Samapoor
0bae21b1d1
Refactors "strpos" calls in /apps/dav to improve code readability.
...
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
2023-06-12 09:46:07 +02:00
Thomas Citharel
13a3ebd4cc
feat(CardDAV): Add Sabre\DAV\IMoveTarget support to OCA\DAV\CardDAV\AddressBook
...
This allows to just UPDATE the card row instead of deleting it and reinsert it. It's very similar to https://github.com/nextcloud/server/pull/30120 for calendars.
As we need the addressbookid exposed, this introduces OCA\DAV\CardDAV\Card that extends Sabre's.
I chose specifically NOT to auto-inject LoggerInterface in Addressbook like in #30120 because the chain of DI is huge just for ONE simple call and it would break an existing dirty call (OCA\Contacts calling OCA\DAV) of ContactsManager in Contacts: https://github.com/nextcloud/contacts/pull/1722 (in SocialApiService), but this is debatable.
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2023-05-16 11:38:57 +02:00
Anna Larch
5c2eb732f1
fix(carddav): expose system address book
...
Signed-off-by: Anna Larch <anna@nextcloud.com>
2023-05-11 18:59:30 +02:00
Thomas Citharel
ff3b69b21d
refactor(dav): Since we're in a transaction, use QB properly when 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>
2023-04-17 16:08:44 +00:00
Thomas Citharel
c9a3129cb4
fix(CalDAV/CardDAV): put every method from Cal/CardDAV backends that does 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>
2023-04-17 16:08:44 +00:00
jld3103
7e58aa1a05
Fix DAV types
...
Signed-off-by: jld3103 <jld3103yt@gmail.com>
2023-04-05 07:06:50 +02: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 +01:00
Anna Larch
9dd51601c6
Switch to DisplayNameCache for CardDAV
...
Signed-off-by: Anna Larch <anna@nextcloud.com>
2022-11-03 10:26:34 +01: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 +00:00
Christoph Wurst
19b7dad3dc
Wrap address book creation write-read in a transaction
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-10-03 17:48:52 +02:00
Joas Schilling
d41841b4a7
Check address book URI length before creation
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-08-26 13:58:18 +02:00
Anna Larch
61b55c88da
performance optimisation for carddav backend blob data read
...
Signed-off-by: Anna Larch <anna@nextcloud.com>
2022-08-15 20:47:58 +02: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 -04:00
Carl Schwan
6114176b71
Cleanup CardDav SyncService
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-06-24 20:25:38 +02:00
Carl Schwan
3598ec4028
Add typing to Sharing Backend
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-06-22 10:25:17 +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
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
Carl Schwan
2cdaa28acc
Don't recreate sql query each time
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-03-10 15:10:08 +01:00
Carl Schwan
cb7485e764
Fix more than 1000 entries in queries exception in CardDavBackend
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-02-21 14:30:00 +01:00
Joas Schilling
d5cb5a33dc
Convert strict_search to wildcard property and add psalm docs
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-08 19:24:16 +01:00
Joas Schilling
84d37143b0
Only wildcard search if enumeration is allowed
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-08 18:54:42 +01:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +02: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 +08: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 +01:00
Roeland Jago Douma
ff1c5c4e25
Move getChangesForAddressBook to QueryBuilder
...
Makes psalm happy, and makes me happy.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-02-17 09:06:00 +01: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 +01:00
Christoph Wurst
9ce3ea3368
Update license headers
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-30 14:07:05 +01:00
Roeland Jago Douma
72fda10333
Merge pull request #22085 from nextcloud/enh/index-socialprofile
...
adding social profile to search index
2020-12-22 09:43:12 +01:00
Christoph Wurst
fbf25e164d
Merge pull request #24515 from nextcloud/fix/noid/dav-share-groups-special-chars
...
fixes sharing to group ids with characters that are being url encoded
2020-12-18 12:01:49 +01:00
Arthur Schiwon
622d02842c
fixes sharing to group ids /w chars that are being url encoded, carddav
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-12-16 22:42:57 +01:00
Christoph Wurst
d89a75be0b
Update all license headers for Nextcloud 21
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +01:00
Joas Schilling
8027dcbc6f
Don't leave cursors open when tests fail
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-09 12:28:17 +01:00
Christoph Wurst
d9015a8c94
Format code to a single space around binary operators
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +02:00
Morris Jobke
99c9423766
Remove @suppress SqlInjectionChecker
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-09-16 15:53:56 +02:00
Christoph Wurst
2a054e6c04
Update the license headers for Nextcloud 20
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +02:00
Georg Ehrke
e6433eeb02
Typecast parameter of getAddressBookById
...
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-08-19 15:30:13 +02:00
Georg Ehrke
67f1ef4658
Add Typed Events for CalDAV- and CardDAV-related Events
...
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-08-18 21:40:57 +02:00