Christoph Wurst
c1d4f8161b
Migrate internal classes to the OCP db col types
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Morris Jobke
24d436cb60
Remove unneeded casts that were found by Psalm
In preparation of the update of Psalm from 4.2.1 to 4.3.1+ (see https://github.com/nextcloud/server/pull/24521 )
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
3 years ago
Christoph Wurst
9ce3ea3368
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Christoph Wurst
1e0eaa25d0
Drop all dead packages
Apparently we have plenty of leftover of previous sub-dependencies.
Composer automatically dumps those with any future dependency update, so
I'm dropping them in an atomic step.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Joas Schilling
96253c7c1b
Add missing parent::__construct() calls to Jobs
Signed-off-by: Joas Schilling <coding@schilljs.com>
3 years ago
Roeland Jago Douma
6166e1a157
Use proper OCP\BackgroundJobs\Job
And typehunt the IJobList
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
3 years ago
Joas Schilling
8027dcbc6f
Don't leave cursors open when tests fail
Signed-off-by: Joas Schilling <coding@schilljs.com>
3 years ago
Roeland Jago Douma
1f2ff18439
Make sure the function signatures of the backgroundjob match
Else PHP says no
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
3 years ago
Christoph Wurst
d9015a8c94
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Christoph Wurst
2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Joas Schilling
faff16f8cb
Fix PSR-4 compatible namespace
Signed-off-by: Joas Schilling <coding@schilljs.com>
3 years ago
Morris Jobke
0763a17332
Move federated_share_added into a typed event
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4 years ago
Joas Schilling
77c9ff838a
Move federation to migrations
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 years ago
Joas Schilling
d7c0b9cced
Also always return in app commands
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 years ago
Christoph Wurst
cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst
28f8eb5dba
Add visibility to all constants
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
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
14c996d982
Use elseif instead of else if
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
41b5e5923a
Use exactly one empty line after the namespace declaration
For PSR2
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
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 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>
4 years ago
Roeland Jago Douma
dd5862e270
A failing federation sync job is not an error
This is an INFO warning at best. Else it spams the logs continiously.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
5 years ago
Arthur Schiwon
38a90130ce
move log constants to ILogger
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
6 years ago
Bjoern Schiessle
0e0cfa0fa1
improve error reporting and move format parameter to the options
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
6 years ago
Morris Jobke
d3d045dd5c
Remove unused import statements
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Morris Jobke
eb51f06a3b
Use ::class statement instead of string
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Morris Jobke
2a38605545
Properly log the full exception instead of only the message
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Roeland Jago Douma
2c2e1c4c7a
Catch the errors related to untrusted self signed certificates for federation
* Added tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Roeland Jago Douma
d24b6866b1
Actually set the status so we don't cause another exception
* And add tests so I don't mess up again
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Roeland Jago Douma
79554a29e0
Do not log Exception if a connection error occured
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Morris Jobke
0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Joas Schilling
4ca4b270e7
Close all the cursors
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 years ago
Joas Schilling
81c54ea515
Use automatic injection whenever possible
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 years ago
Lukas Reschke
f93a82b8b0
Remove explicit type hints for Controller
This is public API and breaks the middlewares of existing apps. Since this also requires maintaining two different code paths for 12 and 13 I'm at the moment voting for reverting this change.
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
7 years ago
Roeland Jago Douma
bc54e6ff7c
Use ITimeFactory
* Inject the timefacotry so we can mock it properly in the tests.
* Extended unit tests to cover the new paths
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
7 years ago
Bjoern Schiessle
3ffff08819
we don't need to remove the job manually here, even if we ask once more the other server will decline and the background job will be removed
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
7 years ago
Bjoern Schiessle
9c9cb1a6db
cleanup constructors
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
7 years ago
Bjoern Schiessle
06b9e58081
expire requestSharedSecret job after 30 days
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
7 years ago
Bjoern Schiessle
51d85eb2f8
expire getShareadSecret job after 30 days
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
7 years ago
Lukas Reschke
d321e9792e
Add |null to PHPDoc
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
7 years ago
Roeland Jago Douma
f71dc7523f
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
7 years ago
Morris Jobke
c54a59d51e
Remove unused use statements
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
Roeland Jago Douma
bec4b468c3
No need to log guzzle exception
When getting/requesting a shared secret there is no need to log the full
exception when an unexpected status code is returned since this won't
really tell us anything as the bad stuff happened on a remote server
Fixes #3380
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
7 years ago
Morris Jobke
1729e4471f
Update comments to Nextcloud
* based on PR by @Ardinis
* see #4311
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 years ago
Roeland Jago Douma
53bca14a27
Do proper DI
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
7 years ago
Bjoern Schiessle
3bc72f7224
give old end-points a seperate name
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
7 years ago
Bjoern Schiessle
e2d7bffcda
fix constructor
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
7 years ago
Bjoern Schiessle
d5dec527c9
get addressbook url and carddav user from remote server
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
7 years ago