]> source.dussan.org Git - nextcloud-server.git/commitdiff
also return success if no shares are found.
authorBjoern Schiessle <schiessle@owncloud.com>
Mon, 30 Sep 2013 11:05:34 +0000 (13:05 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Mon, 30 Sep 2013 11:05:34 +0000 (13:05 +0200)
apps/files_sharing/lib/api.php

index 455784558b5f1e92b099a103e86a4b96c26ed75a..c3048da9a41b4077341df3c059e482fa369d43be 100644 (file)
@@ -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);
                }
+
        }
 
        /**