From 7d846c7536b7bf4091de37372e7ea1928c94bbc8 Mon Sep 17 00:00:00 2001 From: kevinjardine Date: Wed, 4 Mar 2009 11:10:42 +0000 Subject: AccessControlQueryComponent::__toString changed to use get_access_sql_suffix git-svn-id: https://code.elgg.org/elgg/trunk@3062 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/query.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'engine/lib/query.php') diff --git a/engine/lib/query.php b/engine/lib/query.php index 50af0199e..118545b9b 100644 --- a/engine/lib/query.php +++ b/engine/lib/query.php @@ -180,9 +180,15 @@ function __toString() { - $access = get_access_list(); + //$access = get_access_list(); + // KJ - changed to use get_access_sql_suffix + // Note: currently get_access_sql_suffix is hardwired to use + // $acl_field = "access_id", $object_owner_table = $acl_table, and + // $object_owner_id_field = "owner_guid" + // TODO: recode get_access_sql_suffix to make it possible to specify alternate field names + return "and ".get_access_sql_suffix($this->acl_table); // Add access controls - return "and ({$this->acl_table}.{$this->acl_field} in {$access} or ({$this->acl_table}.{$this->acl_field} = 0 and {$this->object_owner_table}.{$this->object_owner_id_field} = {$_SESSION['id']}))"; + //return "and ({$this->acl_table}.{$this->acl_field} in {$access} or ({$this->acl_table}.{$this->acl_field} = 0 and {$this->object_owner_table}.{$this->object_owner_id_field} = {$_SESSION['id']}))"; } } -- cgit v1.2.3