also return success if no shares are found.

remotes/origin/stable6
Bjoern Schiessle 12 years ago
parent 6d830087db
commit 513dc20d4b
  1. 7
      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);
}
}
/**

Loading…
Cancel
Save