From ca08eb6d170d375ef4fca53604956f3474c7db19 Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 22 Aug 2010 22:37:30 +0000 Subject: Merged r6701:6756 from 1.7 branch into trunk git-svn-id: http://code.elgg.org/elgg/trunk@6849 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/group.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'engine/lib/group.php') diff --git a/engine/lib/group.php b/engine/lib/group.php index 68829dafb..474baf609 100644 --- a/engine/lib/group.php +++ b/engine/lib/group.php @@ -460,15 +460,11 @@ function remove_object_from_group($group_guid, $object_guid) { * @param unknown_type $offset Where to start, by default 0. * @param unknown_type $count Whether to return the entities or a count of them. */ -function get_objects_in_group($group_guid, $subtype = "", $owner_guid = 0, $site_guid = 0, $order_by = "", $limit = 10, $offset = 0, $count = false) { - global $CONFIG; - - if ($subtype === false || $subtype === null || $subtype === 0) { - return false; +function get_objects_in_group($group_guid, $subtype = "", $owner_guid = 0, $site_guid = 0, $order_by = "", $limit = 10, $offset = 0, $count = FALSE) { + if ($subtype === FALSE || $subtype === null || $subtype === 0) { + return FALSE; } - $subtype = get_subtype_id('object', $subtype); - if ($order_by == "") { $order_by = "e.time_created desc"; } @@ -488,7 +484,11 @@ function get_objects_in_group($group_guid, $subtype = "", $owner_guid = 0, $site $where = array(); $where[] = "e.type='object'"; - if ($subtype!=="") { + + if (!empty($subtype)) { + if (!$subtype = get_subtype_id('object', $subtype)) { + return FALSE; + } $where[] = "e.subtype=$subtype"; } if ($owner_guid != "") { -- cgit v1.2.3