aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/AccessControlQueryComponent.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-09-22 17:01:17 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-09-22 17:01:17 +0000
commit965cbe52f22809f19ca150feb585b0218aa89f85 (patch)
treefc1b59b44c5ecbaedf27cc8c71e7abc80a15305e /engine/classes/AccessControlQueryComponent.php
parent56b3e3dcd833a8a9124581b536c69806962b9640 (diff)
downloadelgg-965cbe52f22809f19ca150feb585b0218aa89f85.tar.gz
elgg-965cbe52f22809f19ca150feb585b0218aa89f85.tar.bz2
Converted line endings to unix.
git-svn-id: http://code.elgg.org/elgg/trunk@6957 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/classes/AccessControlQueryComponent.php')
-rw-r--r--engine/classes/AccessControlQueryComponent.php76
1 files changed, 38 insertions, 38 deletions
diff --git a/engine/classes/AccessControlQueryComponent.php b/engine/classes/AccessControlQueryComponent.php
index 7808800bc..07028462f 100644
--- a/engine/classes/AccessControlQueryComponent.php
+++ b/engine/classes/AccessControlQueryComponent.php
@@ -1,39 +1,39 @@
-<?php
-/**
- * The access control component of the query class.
- *
- * @todo probably remove.
- * @access private
- * @package Elgg.Core
- * @subpackage Unimplemented
- */
-class AccessControlQueryComponent extends QueryComponent {
- /**
- * Construct the ACL.
- *
- * @param string $acl_table The table where the access control field is.
- * @param string $acl_field The field containing the access control.
- * @param string $object_owner_table The table containing the owner information for the stuff you're retrieving.
- * @param string $object_owner_id_field The field in $object_owner_table containing the owner information
- */
- function __construct($acl_table = "entities", $acl_field = "access_id", $object_owner_table = "entities", $object_owner_id_field = "owner_guid") {
- global $CONFIG;
-
- $this->acl_table = $CONFIG->dbprefix . sanitise_string($acl_table);
- $this->acl_field = sanitise_string($acl_field);
- $this->object_owner_table = $CONFIG->dbprefix . sanitise_string($object_owner_table);
- $this->object_owner_id_field = sanitise_string($object_owner_id_field);
- }
-
- function __toString() {
- //$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']}))";
- }
+<?php
+/**
+ * The access control component of the query class.
+ *
+ * @todo probably remove.
+ * @access private
+ * @package Elgg.Core
+ * @subpackage Unimplemented
+ */
+class AccessControlQueryComponent extends QueryComponent {
+ /**
+ * Construct the ACL.
+ *
+ * @param string $acl_table The table where the access control field is.
+ * @param string $acl_field The field containing the access control.
+ * @param string $object_owner_table The table containing the owner information for the stuff you're retrieving.
+ * @param string $object_owner_id_field The field in $object_owner_table containing the owner information
+ */
+ function __construct($acl_table = "entities", $acl_field = "access_id", $object_owner_table = "entities", $object_owner_id_field = "owner_guid") {
+ global $CONFIG;
+
+ $this->acl_table = $CONFIG->dbprefix . sanitise_string($acl_table);
+ $this->acl_field = sanitise_string($acl_field);
+ $this->object_owner_table = $CONFIG->dbprefix . sanitise_string($object_owner_table);
+ $this->object_owner_id_field = sanitise_string($object_owner_id_field);
+ }
+
+ function __toString() {
+ //$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']}))";
+ }
} \ No newline at end of file