]> source.dussan.org Git - nextcloud-server.git/commitdiff
Return the token as well
authorJoas Schilling <coding@schilljs.com>
Tue, 28 Mar 2017 08:51:44 +0000 (10:51 +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>
apps/federatedfilesharing/lib/FederatedShareProvider.php
lib/private/Encryption/File.php

index 9e8d9fd9e47f65d3bfdf6b0ec79b2e0882516fa4..bf50206a733e18517b78e50fd108eeec0041255d 100644 (file)
@@ -983,7 +983,7 @@ class FederatedShareProvider implements IShareProvider {
                }
 
                $qb = $this->dbConnection->getQueryBuilder();
-               $qb->select('share_with', 'file_source', 'file_target')
+               $qb->select('share_with', 'token', 'file_source', 'file_target')
                        ->from('share')
                        ->where($qb->expr()->eq('share_type', $qb->createNamedParameter(\OCP\Share::SHARE_TYPE_REMOTE)))
                        ->andWhere($qb->expr()->in('file_source', $qb->createNamedParameter($ids, IQueryBuilder::PARAM_INT_ARRAY)))
@@ -998,6 +998,7 @@ class FederatedShareProvider implements IShareProvider {
                        $remote[$row['share_with']] = [
                                'node_id' => $row['file_source'],
                                'node_path' => $row['file_target'],
+                               'token' => $row['token'],
                        ];
                }
                $cursor->closeCursor();
index a1fd8e300d4b837f77d97c6d4c37c00ca97373d6..f6fd3382cb5c957b59ab87c7d7afb19708420994 100644 (file)
@@ -94,7 +94,7 @@ class File implements \OCP\Encryption\IFile {
                        $resultForParents = $this->shareManager->getAccessList($parentNode);
                        $this->cache[$parent] = $resultForParents;
                }
-               $userIds = \array_merge($userIds, $resultForParents['users']);
+               $userIds = array_merge($userIds, $resultForParents['users']);
                $public = $resultForParents['public'] || !empty($resultForParents['remote']);