diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2016-10-26 12:18:39 +0200 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2016-11-01 19:54:41 +0100 |
commit | 1e930df91f1724e9bb9ab23a84f51fec31e514db (patch) | |
tree | ae2d40cd3f518af3b207e6c6f9217cd8d093ea3e /lib/private/Share20 | |
parent | 561dd80d576ab87947e49b080dd5eb5d2c0a0ee9 (diff) | |
download | nextcloud-server-1e930df91f1724e9bb9ab23a84f51fec31e514db.tar.gz nextcloud-server-1e930df91f1724e9bb9ab23a84f51fec31e514db.zip |
find and show share-by mail links
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'lib/private/Share20')
-rw-r--r-- | lib/private/Share20/Manager.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 899bd4ebfa1..0c49d0b6490 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -1049,6 +1049,16 @@ class Manager implements IManager { // If it is not a link share try to fetch a federated share by token if ($share === null) { $provider = $this->factory->getProviderForType(\OCP\Share::SHARE_TYPE_REMOTE); + try { + $share = $provider->getShareByToken($token); + } catch (ShareNotFound $e) { + $share = null; + } + } + + // If it is not a link share try to fetch a federated share by token + if ($share === null && $this->shareProviderExists(\OCP\Share::SHARE_TYPE_EMAIL)) { + $provider = $this->factory->getProviderForType(\OCP\Share::SHARE_TYPE_EMAIL); $share = $provider->getShareByToken($token); } |