When calling `Files\Node\Node::copy()`, `Files\View::copy()` gets called,
but `Files\View::fakeRoot` is empty so the hooks are not emitted if no
path is given to `Files\View::shouldEmitHooks()`.
This results in node-related events like `NodeCopiedEvent` not being
fired when copying files via `Files\Node\Node::copy()`.
`Files\View::shouldEmitHooks()` is given a path as parameter in almost
all places except when called from the `copy()` function. This commit
changes it and passes the copy target path.
Fixes: nextcloud/collectives#1756
Signed-off-by: Jonas <jonas@freesources.org>
> Class FeedBackHandler located in ./core/ajax/update.php does not comply with psr-4 autoloading standard (rule: OC\Core\ => ./core). Skipping.
Signed-off-by: Joas Schilling <coding@schilljs.com>
Proper replacement for deprecated `OC_Util::getUserQuota`.
Also we still use this in some cases we can now replace, moreover it
just makes sense to have a machine readable format in the API instead of
only the human readable format which is less precise.
Alings also with `getQuota` of the quota storage, which already returned
the machine readable format.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This currently prevent directly accessing a ressource when clicking on a link on a third party site. Example, clicking on `https://example.com/public.php/dav/files/pqLWcA269zfzXez/?accept=zip` in a GitHub comment.
Skipping the check is an issue with password protected shares, as it allows third party sites to request the ressource when the user already entered the password, aka CSRF. So after removing the check from `base.php`, we need to add the it again in the `PublicAuth` plugin.
We also add a redirect to be helpful to the user.
**Warning**: this adds the limitation that clicking on a direct download link for password protected shares will redirect you to the password form, and then to the main share view.
Fix#52482
Signed-off-by: Louis Chemineau <louis@chmn.me>
The function was already there but called the legacy version.
So moved the implementation and migrated all usages of it.
Sadly the interface was slightly different so adjusted it to be
compatible with both legacy and the OCP one.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Only moves the implementation where it was already existing and adds
more helpful deprecation messages.
This way we can in the future just remove the OC_Helper variants.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This is to avoid issues if the circles app is disabled but you still
have circles shares in your DB
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Ideally circles and talk should migrate to calling registerProvider and
core would not need to use their OCA classes like currently.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
For now I left the ones which are called from lib/
Next step is to fix all calls and remove those as well.
Also the getters should be removed from the implementation.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>