Commit Graph

53 Commits (caff1023ea72bb2ea94130e18a2a6e2ccf819e5f)

Author SHA1 Message Date
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>
4 years ago
Christoph Wurst 3a415e4139
Remove space between switch case and colon
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst afbd9c4e6e
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 2fbad1ed72
Fix (array) indent style to always use one tab
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Joas Schilling d224ee667e
Correctly trim long cyrillic note
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 years ago
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
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>
5 years ago
Morris Jobke a085a88205
Merge pull request #14954 from tacruc/searchPatterns
Allow to search for real pattern in contacts
5 years ago
Georg Ehrke 9f6dd51912
LIMIT is no column but a SQL feature, allow limit on initial sync
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
5 years ago
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>
5 years ago
Georg Ehrke 34601f8623
allow sharing addressbooks with circles
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
5 years ago
Joas Schilling bb352fb667
Use the defined func()->count() instead of manual counting
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 years ago
John Molakvoæ (skjnldsv) b6d8c5ff2f
Add check for vCard uid
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
6 years ago
John Molakvoæ (skjnldsv) 66624cfe0a
Phpunit fix
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
6 years ago
Morris Jobke 7246f2ace5
Update PHPDoc to reflect the actual behaviour
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
John Molakvoæ (skjnldsv) d89edb28c4
move migration
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
6 years ago
John Molakvoæ (skjnldsv) 9afff2fb20
Properly set uid and create and update
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
6 years ago
Morris Jobke d3d045dd5c
Remove unused import statements
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Morris Jobke 31c5c2a592
Change @georgehrke's email
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
Joas Schilling 3b4ab6560b
Check if the user/group exists for dav shares
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 years ago
Thomas Citharel f1bfd4433e
Don't add a LIKE condition when it's not needed
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
7 years ago
Joas Schilling 89238164e1 Fix comparisons in the dav app
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 years ago
Roeland Jago Douma fc369dd86e
[DAV] Fix URLUtil::splitPath usage
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
7 years ago
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>
7 years ago
Georg Ehrke 35781ae45c
urldecode group principals in Cal- and CardDAV backend
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
7 years ago
Roeland Jago Douma 303c0dd6a8
Always dispatch Carddav events
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
7 years ago
Morris Jobke 3e37a5f1c7 Merge pull request #3770 from nextcloud/faster-search-in-contacts
Factorize query for searching contacts
7 years ago
Roeland Jago Douma d842b29c5b Merge pull request #4401 from nextcloud/caldav-carddav-nc-owner-displayname
add owner-displayname property to calendars and addressbooks
7 years ago
Georg Ehrke c89e057d27
add owner-displayname property to calendars and addressbooks
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
7 years ago
Morris Jobke 2b6f6dac00
Remove unused variables
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
Roeland Jago Douma 6d1651452f
Add back the name query part
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
7 years ago
Thomas Citharel ecba3722da
Factorize query for searching contacts 7 years ago
Georg Ehrke 896dd76ab5
fix bug with shared_by for own calendars if shared
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
7 years ago
Joas Schilling 2eb27c636d
Make sure shares use read-write when available
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 years ago
Joas Schilling 6dbdca0721
Don't waste energy unless necessary
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 years ago
Joas Schilling 6bd4e1f65b
Use the correct principal for shared addressbooks
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 years ago
John Molakvoæ (skjnldsv) 7e9411b929
this is public
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
7 years ago
John Molakvoæ (skjnldsv) b8fcd3ce27
getUsersOwnAddressBooks
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
7 years ago
Thomas Müller c778b1bade
Update sabre dav to 3.2 (#26115)
* Update sabre/dav to 3.2.0

* Adjust code to work with sabre/dav 3.2.0 and it's dependencies

* Adding own CalDAV plugin to fix calendar home property

* Test if there is a user logged in when listing files home

* Update sabre version used by integration tests

* Disable unauthenticated DAV access

This is needed to make Sabre 3.2 behave like we did before.
Eventually we should integrate better with the ACL plugin which itself
should implement an auth failure when appropriate.

=====

* Fixed so cherry-pick was succesfull

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
8 years ago
Joas Schilling ce964f0a10
Translate the Contacts addressbook when it's default
Signed-off-by: Joas Schilling <coding@schilljs.com>
8 years ago
Joas Schilling 44fbf6f734
Close cursors 8 years ago
Joas Schilling 08c6ca5a1a
Chunk if you have too many contacts 8 years ago
Roeland Jago Douma 94fb5bcbae
Cast query result to int
Else we never create the default address book
8 years ago
Robin Appelman 344945bfe9 more efficient check if addressbook and calendar exists for user 8 years ago
Joas Schilling 3fbb5de74f
Better displaynames for shared address books 8 years ago
Joas Schilling 813f0a0f40
Fix apps/ 8 years ago
Bjoern Schiessle 5f6944954b get only vcard which match both the address book id and the vcard uri 8 years ago