diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2013-01-07 20:52:51 -0500 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2013-01-07 20:52:51 -0500 |
commit | e8b195bf109d702402735e628b2d239b199088e5 (patch) | |
tree | 22d8920ea9ad18260b80d26848cd74928b269fd9 /lib/public | |
parent | 8f8a5bbfb750b3c9091da810749a43cada2740b2 (diff) | |
download | nextcloud-server-e8b195bf109d702402735e628b2d239b199088e5.tar.gz nextcloud-server-e8b195bf109d702402735e628b2d239b199088e5.zip |
Almost fix Shared scanner...
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/share.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/public/share.php b/lib/public/share.php index c74960b94c5..7722e0b86cc 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -756,7 +756,7 @@ class Share { $collectionItems = array(); foreach ($items as &$row) { // Return only the item instead of a 2-dimensional array - if ($limit == 1 && $row['item_type'] == $itemType && $row[$column] == $item) { + if ($limit == 1 && $row[$column] == $item && ($row['item_type'] == $itemType || $itemType == 'file')) { if ($format == self::FORMAT_NONE) { return $row; } else { @@ -823,6 +823,9 @@ class Share { if (!empty($collectionItems)) { $items = array_merge($items, $collectionItems); } + if (empty($items) && $limit == 1) { + return false; + } if ($format == self::FORMAT_NONE) { return $items; } else if ($format == self::FORMAT_STATUSES) { |