summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-09-30 13:05:34 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2013-09-30 13:05:34 +0200
commit513dc20d4b851381a9096807a930fd7b371a553b (patch)
treeb25616c32fc52b8644ceb5e55b4ad178ae256973 /apps
parent6d830087db71318fb3669cbe5bb38384e5d5a46e (diff)
downloadnextcloud-server-513dc20d4b851381a9096807a930fd7b371a553b.tar.gz
nextcloud-server-513dc20d4b851381a9096807a930fd7b371a553b.zip
also return success if no shares are found.
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/api.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/files_sharing/lib/api.php b/apps/files_sharing/lib/api.php
index 455784558b5..c3048da9a41 100644
--- a/apps/files_sharing/lib/api.php
+++ b/apps/files_sharing/lib/api.php
@@ -44,11 +44,12 @@ class Api {
$share = \OCP\Share::getItemShared('file', null);
- if ($share !== null) {
- return new \OC_OCS_Result($share);
+ if ($share === false) {
+ return new \OC_OCS_Result(null, 404, 'could not get shares');
} else {
- return new \OC_OCS_Result(null, 404, 'no shares available');
+ return new \OC_OCS_Result($share);
}
+
}
/**