diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-08-22 22:37:30 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-08-22 22:37:30 +0000 |
commit | ca08eb6d170d375ef4fca53604956f3474c7db19 (patch) | |
tree | a1e96c6b0ae322fab93373a66e1951e2b3b9be48 /engine/lib/group.php | |
parent | be37104ac63cd25f2eac831ca03d6d2b19976e1c (diff) | |
download | elgg-ca08eb6d170d375ef4fca53604956f3474c7db19.tar.gz elgg-ca08eb6d170d375ef4fca53604956f3474c7db19.tar.bz2 |
Merged r6701:6756 from 1.7 branch into trunk
git-svn-id: http://code.elgg.org/elgg/trunk@6849 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/group.php')
-rw-r--r-- | engine/lib/group.php | 16 |
1 files changed, 8 insertions, 8 deletions
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 != "") { |