Commit Graph

73 Commits

Author SHA1 Message Date
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
blizzz 7d2f5aff1a
Merge pull request #22062 from nextcloud/fix/noid/displayname-in-incoming-remote-share-notification
fix display of remote users in incoming share notifications
2020-08-04 16:26:41 +00:00
Georg Ehrke 5fb2562332
Implement Contacts Backend for Unified Search
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-08-03 16:29:01 +02:00
Joas Schilling a0ee4b584c
Short php syntax
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-08-03 11:25:21 +02:00
Arthur Schiwon 04521c6afc
coding style fixes
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-07-30 21:18:20 +02:00
Arthur Schiwon b79e34c57b
fix check for Cloud ID, missing return statements, wrong param use
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-07-30 21:10:54 +02:00
Morris Jobke aab646a9d0
Update system addressbook card only when there was a change based on a cached etag
Due to our old and new hook system the card dav backend listens to old and new hooks. This triggers this code multiple times and always causes an update. With this change we cache the etag during a request and only trigger the update if the etag has changed. This does not catches all not needed updates, but it does not need another round trip to the database and still covers most cases where multiple attributes are updated during one single request.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-09 11:43:58 +02:00
Joas Schilling 00e7b2b956
Reduce load of the contacts search when we know it can't match
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-15 08:47:30 +02:00
Joas Schilling fdd8c86c60
Fix pagination of contacts search
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-06-10 09:38:59 +02:00
Joas Schilling f662d3663b
Temporary fix contacts search
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-04-29 14:48:41 +02:00
Christoph Wurst cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +02:00
Julius Härtl 6709833dc7
Use paginated search for contacts
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-04-23 19:08:16 +02:00
Georg Ehrke fe4527a8e2
Update Contact Size after removing photo
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-04-15 15:49:49 +02:00
Joas Schilling 648c8df516
Don't populate the PHOTO property when it's not an image
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-04-15 15:49:39 +02:00
Joas Schilling bb754cb363
Always transform the etag and read the data
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-04-15 15:49:36 +02:00
Joas Schilling 2e9f105786
Use table variable everywhere
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-04-15 15:49:12 +02:00
Christoph Wurst 28f8eb5dba
Add visibility to all constants
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:54:27 +02:00
Christoph Wurst 1584c9ae9c
Add visibility to all methods and position of static keyword
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:51:06 +02:00
Christoph Wurst caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.

This also removes and empty lines from method/function bodies at the
beginning and end.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +02:00
Christoph Wurst 3a415e4139
Remove space between switch case and colon
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:17:53 +02:00
Christoph Wurst afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 13:54:22 +02:00
Christoph Wurst 2fbad1ed72
Fix (array) indent style to always use one tab
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 10:16:08 +02:00
Christoph Wurst 1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +02:00
Christoph Wurst b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +01:00
Joas Schilling d224ee667e
Correctly trim long cyrillic note
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-02-25 11:17:02 +01:00
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Roeland Jago Douma 68748d4f85
Some php-cs fixes
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-22 20:52:10 +01:00
Morris Jobke a085a88205
Merge pull request #14954 from tacruc/searchPatterns
Allow to search for real pattern in contacts
2019-07-19 18:03:37 +02:00
Georg Ehrke 9f6dd51912
LIMIT is no column but a SQL feature, allow limit on initial sync
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-07-18 12:42:11 +02:00
Arne Hamann 2c5ebac458
Allow to search for real pattern in contacts
Added an option escape_like_param to allow wildcards

Signed-off-by: Arne Hamann <kontakt+github@arne.email>
2019-05-28 10:01:56 +02:00
Georg Ehrke 34601f8623
allow sharing addressbooks with circles
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2019-03-01 13:02:30 +01:00
Joas Schilling bb352fb667
Use the defined func()->count() instead of manual counting
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-11-08 15:44:45 +01:00
John Molakvoæ (skjnldsv) b6d8c5ff2f
Add check for vCard uid
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-11-05 12:49:39 +01:00
John Molakvoæ (skjnldsv) 66624cfe0a
Phpunit fix
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-11-02 14:20:53 +01:00
Morris Jobke 7246f2ace5
Update PHPDoc to reflect the actual behaviour
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-11-01 15:02:50 +01:00
John Molakvoæ (skjnldsv) d89edb28c4
move migration
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-11-01 15:02:50 +01:00
John Molakvoæ (skjnldsv) 9afff2fb20
Properly set uid and create and update
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-11-01 15:00:49 +01:00
Morris Jobke d3d045dd5c
Remove unused import statements
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-02-14 16:55:43 +01:00
Morris Jobke 31c5c2a592
Change @georgehrke's email
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 20:38:59 +01:00
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01:00
Joas Schilling 3b4ab6560b
Check if the user/group exists for dav shares
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-10-05 12:48:10 +02:00
Thomas Citharel f1bfd4433e
Don't add a LIKE condition when it's not needed
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2017-09-25 09:10:44 +02:00
Joas Schilling 89238164e1 Fix comparisons in the dav app
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-01 13:55:07 +02:00
Roeland Jago Douma fc369dd86e
[DAV] Fix URLUtil::splitPath usage
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-08-01 08:20:17 +02:00
Lukas Reschke 3d2600b039
Add Phan plugin to check for SQL injections
This adds a phan plugin which checks for SQL injections on code using our QueryBuilder, while it isn't perfect it should already catch most potential issues.

As always, static analysis will sometimes have false positives and this is also here the case. So in some cases the analyzer just doesn't know if something is potential user input or not, thus I had to add some `@suppress SqlInjectionChecker` in front of those potential injections.

The Phan plugin hasn't the most awesome code but it works and I also added a file with test cases.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-07-20 22:48:13 +02:00
Georg Ehrke 35781ae45c
urldecode group principals in Cal- and CardDAV backend
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2017-06-12 21:01:30 +02:00
Roeland Jago Douma 303c0dd6a8
Always dispatch Carddav events
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-05-08 11:20:47 +02:00
Morris Jobke 3e37a5f1c7 Merge pull request #3770 from nextcloud/faster-search-in-contacts
Factorize query for searching contacts
2017-04-27 00:25:30 -03:00