diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-03-06 14:00:12 +0100 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-03-25 17:47:24 +0100 |
commit | bc0292c16d5fa8e99727306ef703da1e018defa2 (patch) | |
tree | c8911e903fdce30975e71babfca3096e22b954a1 /lib/private | |
parent | 154277ab1139c0705be2947c4c9995794c7d092b (diff) | |
download | nextcloud-server-bc0292c16d5fa8e99727306ef703da1e018defa2.tar.gz nextcloud-server-bc0292c16d5fa8e99727306ef703da1e018defa2.zip |
always return an array
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/share/share.php | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php index f6f2ac8ccf8..b69f620646f 100644 --- a/lib/private/share/share.php +++ b/lib/private/share/share.php @@ -889,7 +889,7 @@ class Share extends \OC\Share\Constants { * @param bool Include collection item types (optional) * @param bool TODO (optional) * @prams bool check expire date - * @return mixed + * @return array * * See public functions getItem(s)... for parameter usage * @@ -898,11 +898,7 @@ class Share extends \OC\Share\Constants { $uidOwner = null, $format = self::FORMAT_NONE, $parameters = null, $limit = -1, $includeCollections = false, $itemShareWithBySource = false, $checkExpireDate = true) { if (!self::isEnabled()) { - if ($limit == 1 || (isset($uidOwner) && isset($item))) { - return false; - } else { - return array(); - } + return array(); } $backend = self::getBackend($itemType); $collectionTypes = false; @@ -1214,13 +1210,10 @@ class Share extends \OC\Share\Constants { if (!empty($collectionItems)) { $items = array_merge($items, $collectionItems); } - if (empty($items) && $limit == 1) { - return false; - } + return self::formatResult($items, $column, $backend, $format, $parameters); - } else if ($limit == 1 || (isset($uidOwner) && isset($item))) { - return false; } + return array(); } |