diff options
author | Joas Schilling <coding@schilljs.com> | 2017-04-11 12:40:36 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-04-13 12:58:52 +0200 |
commit | 629b7c0fc38d9a2c33805bfcf4359e263e4ae68f (patch) | |
tree | 915d48dcfbc021fad3cbff2a5c53e7de006e630e /apps/federatedfilesharing/lib | |
parent | 6c23a5fa3511e5212c83e8407fa18b12ec975f97 (diff) | |
download | nextcloud-server-629b7c0fc38d9a2c33805bfcf4359e263e4ae68f.tar.gz nextcloud-server-629b7c0fc38d9a2c33805bfcf4359e263e4ae68f.zip |
Adjust docs and make !$currentAccess simpler
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/federatedfilesharing/lib')
-rw-r--r-- | apps/federatedfilesharing/lib/FederatedShareProvider.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/federatedfilesharing/lib/FederatedShareProvider.php b/apps/federatedfilesharing/lib/FederatedShareProvider.php index 617db4a45ac..34e02391e05 100644 --- a/apps/federatedfilesharing/lib/FederatedShareProvider.php +++ b/apps/federatedfilesharing/lib/FederatedShareProvider.php @@ -976,6 +976,9 @@ class FederatedShareProvider implements IShareProvider { return ($result === 'yes'); } + /** + * @inheritdoc + */ public function getAccessList($nodes, $currentAccess) { $ids = []; foreach ($nodes as $node) { @@ -993,6 +996,13 @@ class FederatedShareProvider implements IShareProvider { )); $cursor = $qb->execute(); + if ($currentAccess === false) { + $remote = $cursor->fetch() !== false; + $cursor->closeCursor(); + + return ['remote' => $remote]; + } + $remote = []; while ($row = $cursor->fetch()) { $remote[$row['share_with']] = [ |