summaryrefslogtreecommitdiffstats
path: root/apps/federatedfilesharing/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2016-02-08 18:30:51 +0100
committerRoeland Jago Douma <rullzer@owncloud.com>2016-02-08 18:30:51 +0100
commit7f2cb6ab60198e6c02b55f41cb4239314cdf691a (patch)
tree33029336b217cf3d0d43394602533eb3bf6f2912 /apps/federatedfilesharing/lib
parenta35d5625e0ff3e50ab18b4079c630837e8322ffd (diff)
downloadnextcloud-server-7f2cb6ab60198e6c02b55f41cb4239314cdf691a.tar.gz
nextcloud-server-7f2cb6ab60198e6c02b55f41cb4239314cdf691a.zip
Federates shares have to set a file_target
The old code path is still used to get the sharing info in the webui. This requires the file_target to be set. This does not mean anything for federated shares. Fixes #22215
Diffstat (limited to 'apps/federatedfilesharing/lib')
-rw-r--r--apps/federatedfilesharing/lib/federatedshareprovider.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/federatedfilesharing/lib/federatedshareprovider.php b/apps/federatedfilesharing/lib/federatedshareprovider.php
index 05a9432a32f..0825a0e69bc 100644
--- a/apps/federatedfilesharing/lib/federatedshareprovider.php
+++ b/apps/federatedfilesharing/lib/federatedshareprovider.php
@@ -194,6 +194,12 @@ class FederatedShareProvider implements IShareProvider {
->setValue('token', $qb->createNamedParameter($token))
->setValue('stime', $qb->createNamedParameter(time()));
+ /*
+ * Added to fix https://github.com/owncloud/core/issues/22215
+ * Can be removed once we get rid of ajax/share.php
+ */
+ $qb->setValue('file_target', $qb->createNamedParameter(''));
+
$qb->execute();
$id = $qb->getLastInsertId();