Commit Graph

10333 Commits

Author SHA1 Message Date
Christoph Wurst 8a433a7226
Deprecate ILogger
The logger service was always intended to follow the PSR-3 interface.
It's time to embrace this and switch over to the "official" API,
hence this custom interface can be slowly phased out.

With Nextcloud 20 the logger also got support for
* App id filled out automatically
* Exceptions handling (as replacement for logException)

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-16 19:19:23 +02:00
Christoph Wurst 4152216bd8
Use PSR container interface and deprecate our own abstraction
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-16 13:35:45 +02:00
Morris Jobke fc41810d2f
Merge pull request #21822 from nextcloud/enh/events/additionalscripts
Add real events to load additionalscripts
2020-07-15 19:50:01 +02:00
Morris Jobke cc258ad51a
Merge pull request #21844 from bladewing/bladewing-harden-against-mimetype-mismatch
Avoid substr() error when strpos returns false
2020-07-15 19:33:09 +02:00
Roeland Jago Douma 7d7ba61625
Add real events to load additionalscripts
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-15 14:07:18 +02:00
Christoph Wurst b9a911f0b3
Deprecate the internal Symfony dispatcher adapter
This type is not known on the public API, yet we should make sure that
any usage of this class is noticed and migrated as soon as possible.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-15 13:57:35 +02:00
lui87kw 3fe3d1fca3 Extra white space to follow other ifs
Signed-off-by: lui87kw <lukas.ifflaender@uni-wuerzburg.de>
2020-07-15 10:18:47 +02:00
bladewing 7dafd5831f Avoid substr() error when strpos returns false
"Exception: substr() expects parameter 3 to be int, bool given" can occur on Line 378 $mimePart = substr($icon, 0, strpos($icon, '-'));
This happens, when '-' is not found and strpos returns false instead of an int.
When this occurs, e.g., Activity hangs.

Signed-off-by: lui87kw <lukas.ifflaender@uni-wuerzburg.de>
2020-07-15 10:18:47 +02:00
Julius Härtl 35bdb998ef
Dashboard strict typing
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-15 09:28:12 +02:00
Julius Härtl 31a1494529
Add load method for apps to bootstrap their panels
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-15 09:28:11 +02:00
Julius Härtl b71de68f43
Cleanup public api methods
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-15 09:28:11 +02:00
Julius Härtl 81e5593133
Move to lazy panel registration during registration context
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-15 09:27:57 +02:00
Julius Härtl 673d70dfc5
Add new dashboard public API
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-07-15 09:24:50 +02:00
Morris Jobke 157c652762
Merge pull request #21825 from nextcloud/fix/appframework/services
Fix AppFramework services
2020-07-14 17:07:38 +02:00
Morris Jobke fba64a972f
Merge pull request #21812 from nextcloud/feature/noid/app-bootstrap-without-app.php
Do not load app.php if Application implements IBootstrap
2020-07-14 17:06:06 +02:00
Roeland Jago Douma dca2469462
Merge pull request #21833 from nextcloud/docfix/noid/irequest_getHeader
Fix PHPDoc of IRequest::getHeader
2020-07-14 16:43:09 +02:00
Morris Jobke 6f167f0dd1
Merge pull request #21828 from nextcloud/enhancement/lazy-bootstrap-registration-delegation
Delegate bootstrap registration lazily
2020-07-14 16:37:04 +02:00
Roeland Jago Douma fa9dfd83c9
Fix AppFramework services
* We can't just register an alias as the services need the appId to be
  injected. if we just register an alias this blows up since the main
  container doesn't have the appId.
* Moved the Authtokens over to show the PoC works

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-14 16:01:14 +02:00
Morris Jobke d9cc2f0213
Do not load app.php if Application implements IBootstrap
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-14 15:55:23 +02:00
Christoph Wurst f03f88b437
Delegate bootstrap registration lazily
* Keep the registration context
* Expose the context object for other components
* Ensure registration is only run once

Search providers are migrated for demonstration.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-14 15:33:32 +02:00
Georg Ehrke 3bdfb380fc
Fix PHPDoc of IRequest::getHeader
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
2020-07-14 14:20:43 +02:00
Christoph Wurst ab303dddcd
Make the PSR-3 adapter exception-aware
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-07-14 09:38:51 +02:00
Morris Jobke cbbbbee8b1
Merge pull request #21785 from nextcloud/techdebt/noid/remove-classmap-in-files_external
Move OC_Mount_Config to proper classname and remove OC::$CLASSPATH us…
2020-07-13 16:47:12 +02:00
Morris Jobke 7569bc15bd
Merge pull request #21789 from nextcloud/ftp-filter-hash
filter files containing a hash in the path for ftp storages
2020-07-13 10:56:16 +02:00
Robin Appelman e357d46863
filter files containing a hash in the path for ftp storages
the php ftp streamwrapper doesn't handle hashes correctly and will break when it tries to enter a path containing a hash.

By filtering out paths containing a hash we can at least stop the external storage from breaking completely

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-10 14:18:40 +02:00
Morris Jobke 065ef14cb0
Move OC_Mount_Config to proper classname and remove OC::$CLASSPATH usage in files_external
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-10 00:02:59 +02:00
Roeland Jago Douma 10d862e243
Merge pull request #21759 from nextcloud/enh/lazy_subscription
Make the subscription registry lazy
2020-07-09 15:43:48 +02:00
Roeland Jago Douma 725872c23a
Make the subscription registry lazy
This will allow to do lazy registration here which should allow for
loading less (or at least only when needed!).

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-09 12:21:06 +02:00
Robin Appelman 70906a359f
ensure home storage is initialized on first setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-09 11:14:45 +02:00
Roeland Jago Douma 43efac345e
Use the correct mountpoint to calculate
If we use the owners mount point this results in null. And then the rest
of the checks get called with null. Which doesn't work.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-09 11:14:44 +02:00
Morris Jobke 9e88456768
Fix regression in return value of OC_Util::checkDataDirectoryPermissions due to #21761
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-09 09:29:44 +02:00
Roeland Jago Douma c7d9636e82
Kill another unneeded translation
We should only translate things when we actually need them.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-08 21:47:16 +02:00
Roeland Jago Douma ce5cb5ac33
Merge pull request #21758 from nextcloud/fix/routes/defaults
Fix supporting defaults for routes
2020-07-08 20:42:28 +02:00
Roeland Jago Douma 3f447b9c8c
Fix supporting defaults for routes
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-08 19:52:45 +02:00
Roeland Jago Douma 76eb793f9b
Only translate if we need the string
This translation was done in each call. Over and over and over again.
All while it was probably not used in 99.99999% of the cases. A small
gain. But still.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-08 15:12:01 +02:00
Roeland Jago Douma edc1c77dd9
Do not create a RouteActionHandler object for each route
This is not required and doesn't allow us to be properly lazy. On top of
it this doesnt allow us to cache the routes (since closures/objects
can't be cached).

This is the first small step into cleaning up the routing we have

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-07 12:33:22 +02:00
Morris Jobke cd7a6276f2
Merge pull request #21676 from J0WI/fix-chmod-on-fd
Fix chmod on file descriptor
2020-07-07 09:44:57 +02:00
Morris Jobke 560c485e5d
Merge pull request #21714 from nextcloud/td/remove/getAppFolder
Remove old deprecated getAppFolder
2020-07-06 22:36:55 +02:00
Roeland Jago Douma 7d128ebf3e
Remove old deprecated getAppFolder
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-07-06 22:06:58 +02:00
Holger Hees e70249e089
Update SecurityMiddleware.php
OC::$WEBROOT can be empty in case if your nextcloud installation has no url prefix. This will result in an empty Location Header.

in other areas OC::$WEBROOT is always used together with an /
2020-07-06 21:34:46 +02:00
Morris Jobke 37856cd377
Cascading effect - more code that now is not used anymore
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-06 14:13:53 +02:00
Morris Jobke e20db42a0c
Tags.php and the old sharing mechanism
The old sharing mechanism isn't working anymore, because it was replaced by Share 2.0. Also it was nowhere used so this removes the code paths and reduces complexity.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-06 14:12:12 +02:00
Morris Jobke e878c0a054
Merge pull request #21074 from jvsalo/shared-lock-multi-release
Fix releasing a shared lock multiple times
2020-07-06 14:06:41 +02:00
Morris Jobke fb69d6d195
Merge pull request #21238 from nextcloud/techdebt/noid/deferrable-notification-apps
Allow notification apps to defer and flush the sending
2020-07-06 13:50:25 +02:00
Morris Jobke 6c825ee9a0
Merge pull request #21665 from nextcloud/debt/noid/job-list
Fix wrong phpdoc for execute method
2020-07-06 11:14:14 +02:00
Morris Jobke b1cdd0dd9b
Use formal type hints instead of informal PHPDoc
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-06 10:13:23 +02:00
Morris Jobke e900f424ce
Merge pull request #21636 from nextcloud/lock-exception-readable-path
add proper paths to locking exceptions
2020-07-05 22:37:12 +02:00
Morris Jobke d3d11cb826
Merge pull request #21626 from nextcloud/enhancement/injectible-callables
Callable parameter injection
2020-07-05 22:03:12 +02:00
Roeland Jago Douma 4d8b4ef3cc
Merge pull request #21533 from nextcloud/techdebt/noid/dedicated-method-to-get-a-users-language
Techdebt/noid/dedicated method to get a users language
2020-07-04 08:56:13 +02:00
J0WI 6ca1599ea4 Fix chmod on file descriptor
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2020-07-03 20:53:58 +02:00