summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2016-12-22 10:59:27 +0100
committerBjoern Schiessle <bjoern@schiessle.org>2016-12-22 11:01:34 +0100
commit9d3de74b2ddbbca73825888035d7ff3d2c82b110 (patch)
treed9968301f349d04ece17fde27e697e31e6cb21a6 /lib
parente9727440dd2f3bbde65ae125a6c47ad27aadca0b (diff)
downloadnextcloud-server-9d3de74b2ddbbca73825888035d7ff3d2c82b110.tar.gz
nextcloud-server-9d3de74b2ddbbca73825888035d7ff3d2c82b110.zip
no need to throw a exception we catch two lines later
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Share20/Manager.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index ec1866f21ce..6eab5e05a2f 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -1055,11 +1055,10 @@ class Manager implements IManager {
public function getShareByToken($token) {
$share = null;
try {
- if(!$this->shareApiAllowLinks()) {
- throw new ShareNotFound();
+ if($this->shareApiAllowLinks()) {
+ $provider = $this->factory->getProviderForType(\OCP\Share::SHARE_TYPE_LINK);
+ $share = $provider->getShareByToken($token);
}
- $provider = $this->factory->getProviderForType(\OCP\Share::SHARE_TYPE_LINK);
- $share = $provider->getShareByToken($token);
} catch (ProviderException $e) {
} catch (ShareNotFound $e) {
}
@@ -1075,7 +1074,7 @@ class Manager implements IManager {
}
}
- // If it is not a link share try to fetch a federated share by token
+ // If it is not a link share try to fetch a mail share by token
if ($share === null && $this->shareProviderExists(\OCP\Share::SHARE_TYPE_EMAIL)) {
try {
$provider = $this->factory->getProviderForType(\OCP\Share::SHARE_TYPE_EMAIL);