diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-07-18 11:13:12 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-07-18 11:13:12 +0000 |
commit | aafccab48912790f191465b60371f9ab4259d8bd (patch) | |
tree | cd4ee6a6deed4c9ff6e9b40e9c1fb691068a0350 | |
parent | b53371b0512a034c68cc3c24d4fc42df6a7d40d3 (diff) | |
download | elgg-aafccab48912790f191465b60371f9ab4259d8bd.tar.gz elgg-aafccab48912790f191465b60371f9ab4259d8bd.tar.bz2 |
Fix for access collections
git-svn-id: https://code.elgg.org/elgg/trunk@1465 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/lib/access.php | 10 |
1 files changed, 9 insertions, 1 deletions
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;
|