aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/access.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-18 14:56:55 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-18 14:56:55 +0000
commit05166c349deafea6614a381fdacfca28ced9c3ff (patch)
treed3a1e9f527bfa27df58b760b8639c0edbc56da51 /engine/lib/access.php
parent4599d66629c55b8299e2fd63c5d018e2e8e6472d (diff)
downloadelgg-05166c349deafea6614a381fdacfca28ced9c3ff.tar.gz
elgg-05166c349deafea6614a381fdacfca28ced9c3ff.tar.bz2
Corrected minor friend collection issue
git-svn-id: https://code.elgg.org/elgg/trunk@2005 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/access.php')
-rw-r--r--engine/lib/access.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/engine/lib/access.php b/engine/lib/access.php
index b21971c09..01cb8a93e 100644
--- a/engine/lib/access.php
+++ b/engine/lib/access.php
@@ -189,7 +189,7 @@
$query = "select ag.* from {$CONFIG->dbprefix}access_collections ag ";
$query .= " where (ag.site_guid = {$site_id} or ag.site_guid = 0)";
$query .= " and (ag.owner_guid = {$user_id})";
- $query .= " and ag.id > 3";
+ $query .= " and ag.id >= 3";
$tmp_access_array = array(0 => elgg_echo("PRIVATE"), 1 => elgg_echo("LOGGED_IN"), 2 => elgg_echo("PUBLIC"));
if ($collections = get_data($query)) {
@@ -225,10 +225,10 @@
if (empty($name)) return false;
if ($user_id == 0) $user_id = $_SESSION['id'];
- if (($site_id == 0) && (isset($CONFIG->site_id))) $site_id = $CONFIG->site_id;
+ if (($site_id == 0) && (isset($CONFIG->site_guid))) $site_id = $CONFIG->site_guid;
$name = sanitise_string($name);
- return insert_data("insert into {$CONFIG->dbprefix}access_collections set name = '{$name}', owner_guid = {$owner_guid}, site_guid = {$site_guid}");
+ return insert_data("insert into {$CONFIG->dbprefix}access_collections set name = '{$name}', owner_guid = {$owner_guid}, site_guid = {$site_id}");
}
@@ -317,6 +317,8 @@
if (!($collection = get_access_collection($collection_id)))
return false;
+ system_message("$collection_id $user_guid collection");
+
if ((array_key_exists($collection_id, $collections) || $collection->owner_guid == 0)
&& $user = get_user($user_guid)) {