diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-07-10 21:30:16 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-07-10 21:30:16 -0400 |
commit | a7416b1cd8386bfef5c2911c2f7ec39e5a67d7ef (patch) | |
tree | fdf12cc6e15c64dc4b959328fc617edcb3d4a57b /lib/public | |
parent | c21ff29a53fc26ae0e8942f81b4c0f8a66a9d860 (diff) | |
download | nextcloud-server-a7416b1cd8386bfef5c2911c2f7ec39e5a67d7ef.tar.gz nextcloud-server-a7416b1cd8386bfef5c2911c2f7ec39e5a67d7ef.zip |
Add back returning only the item if the limit is 1 and now check that the format is set to none
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/share.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/public/share.php b/lib/public/share.php index 7837e91f102..c6dff4467d9 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -481,6 +481,10 @@ class Share { $result = $query->execute(); $items = array(); while ($item = $result->fetchRow()) { + // Return only the item instead of a 2-dimensional array + if ($limit == 1 && $format == self::FORMAT_NONE) { + return $item; + } // Filter out duplicate group shares for users with unique targets if ($item['share_type'] == self::$shareTypeGroupUserUnique) { // Remove the parent group share |