aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-03-27 23:39:20 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-04-13 12:58:51 +0200
commitcf7c3209490c60f03fc90b6a71d5d1e00a9d802e (patch)
tree05b564c3d96759a6513b80a71bc1599ee8332c77 /lib
parent91e650791de6dbb320e5163f626c754d42e0bc35 (diff)
downloadnextcloud-server-cf7c3209490c60f03fc90b6a71d5d1e00a9d802e.tar.gz
nextcloud-server-cf7c3209490c60f03fc90b6a71d5d1e00a9d802e.zip
Also return the token
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Share20/ShareHelper.php16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/private/Share20/ShareHelper.php b/lib/private/Share20/ShareHelper.php
index 93b32cef3c3..b5640d04552 100644
--- a/lib/private/Share20/ShareHelper.php
+++ b/lib/private/Share20/ShareHelper.php
@@ -100,12 +100,15 @@ class ShareHelper implements IShareHelper {
if (!isset($byId[$info['node_id']])) {
$byId[$info['node_id']] = [];
}
- $byId[$info['node_id']][$cloudId] = $info['node_path'];
+ $byId[$info['node_id']][$cloudId] = $info['token'];
}
if (isset($byId[$node->getId()])) {
- foreach ($byId[$node->getId()] as $cloudId => $_) {
- $results[$cloudId] = '/' . $node->getName();
+ foreach ($byId[$node->getId()] as $cloudId => $token) {
+ $results[$cloudId] = [
+ 'node_path' => '/' . $node->getName(),
+ 'token' => $token,
+ ];
}
unset($byId[$node->getId()]);
}
@@ -120,8 +123,11 @@ class ShareHelper implements IShareHelper {
$item = $item->getParent();
if (!empty($byId[$item->getId()])) {
- foreach ($byId[$item->getId()] as $uid => $_) {
- $results[$uid] = $path;
+ foreach ($byId[$item->getId()] as $uid => $token) {
+ $results[$uid] = [
+ 'node_path' => $path,
+ 'token' => $token,
+ ];
}
unset($byId[$item->getId()]);
}