From aafccab48912790f191465b60371f9ab4259d8bd Mon Sep 17 00:00:00 2001 From: ben Date: Fri, 18 Jul 2008 11:13:12 +0000 Subject: Fix for access collections git-svn-id: https://code.elgg.org/elgg/trunk@1465 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/access.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'engine') diff --git a/engine/lib/access.php b/engine/lib/access.php index 471b85236..c04b7a9bc 100644 --- a/engine/lib/access.php +++ b/engine/lib/access.php @@ -77,7 +77,15 @@ if ($collections = get_data($query)) { foreach($collections as $collection) - $tmp_access_array[] = $collection->access_collection_id; + if (!empty($collection->access_collection_id)) $tmp_access_array[] = $collection->access_collection_id; + } + + $query = "select ag.id from {$CONFIG->dbprefix}access_collections ag "; + $query .= " where ag.owner_guid = {$user_id} and (ag.site_guid = {$site_id} or ag.site_guid = 0)"; + + if ($collections = get_data($query)) { + foreach($collections as $collection) + if (!empty($collection->id)) $tmp_access_array[] = $collection->id; } $access_array[$user_id] = $tmp_access_array; -- cgit v1.2.3