]> source.dussan.org Git - nextcloud-server.git/commitdiff
Also return the token
authorJoas Schilling <coding@schilljs.com>
Mon, 27 Mar 2017 21:39:20 +0000 (23:39 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Thu, 13 Apr 2017 10:58:51 +0000 (12:58 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/Share20/ShareHelper.php

index 93b32cef3c3f02da3ffd013a5b190e91fd545a7c..b5640d045526afa8e1d1e425a22ae2cd135ec9d6 100644 (file)
@@ -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()]);
                        }