From 3a8b119331beca1e31b3f7ca376395acb9ab3bb0 Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 29 Aug 2010 13:09:12 +0000 Subject: Merged [6875] from 1.7 branch into trunk git-svn-id: http://code.elgg.org/elgg/trunk@6878 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/access.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'engine/lib/access.php') diff --git a/engine/lib/access.php b/engine/lib/access.php index 39f7925c6..c7a87ced5 100644 --- a/engine/lib/access.php +++ b/engine/lib/access.php @@ -712,10 +712,11 @@ function get_entities_from_access_id($collection_id, $entity_type = "", $entity_ $options['order_by'] = sanitise_string("e.time_created, $order_by"); } - if ((is_array($owner_guid) && (count($owner_guid)))) { - $options['owner_guids'] = array(); - foreach($owner_guid as $guid) { - $options['owner_guids'][] = $guid; + if ($owner_guid) { + if (is_array($owner_guid)) { + $options['owner_guids'] = $owner_guid; + } else { + $options['owner_guid'] = $owner_guid; } } -- cgit v1.2.3