Add back returning only the item if the limit is 1 and now check that the format is set to none

This commit is contained in:
Michael Gapczynski 2012-07-10 21:30:16 -04:00
parent c21ff29a53
commit a7416b1cd8

View file

@ -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