aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorkevinjardine <kevinjardine@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-03-04 11:10:42 +0000
committerkevinjardine <kevinjardine@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-03-04 11:10:42 +0000
commit7d846c7536b7bf4091de37372e7ea1928c94bbc8 (patch)
treea399172f9d9a566c0f36698446ba81f96e10b29a /engine
parentd429cdeb9b74bb6452270d169f0c9fc5f325122e (diff)
downloadelgg-7d846c7536b7bf4091de37372e7ea1928c94bbc8.tar.gz
elgg-7d846c7536b7bf4091de37372e7ea1928c94bbc8.tar.bz2
AccessControlQueryComponent::__toString changed to use get_access_sql_suffix
git-svn-id: https://code.elgg.org/elgg/trunk@3062 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/query.php10
1 files changed, 8 insertions, 2 deletions
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']}))";
}
}