aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-02 17:11:26 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-02 17:11:26 +0000
commitd3a25f928980c31402df367430b183262a80e66c (patch)
treecff37bd2512dba74fbeeae1f5e7289da9364a7a4 /engine
parent086c5cca63d3488d40f5dac6a506d0ae03461d66 (diff)
downloadelgg-d3a25f928980c31402df367430b183262a80e66c.tar.gz
elgg-d3a25f928980c31402df367430b183262a80e66c.tar.bz2
Small fix for get_entities
git-svn-id: https://code.elgg.org/elgg/trunk@374 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/entities.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 5660e2e34..d922a28ce 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -607,9 +607,8 @@
$query = "SELECT * from {$CONFIG->dbprefix}entities where ";
foreach ($where as $w)
$query .= " $w and ";
- $query .= " (access_id in {$access} or (access_id = 0 and owner_guid = {$_SESSION['id']}))"; // Add access controls
- $query .= " order by $order_by limit $limit, $offset"; // Add order and limit
-
+ $query .= " (access_id in {$access} or (access_id = 0 and owner_guid = {$_SESSION['guid']}))"; // Add access controls
+ $query .= " order by $order_by limit $offset, $limit"; // Add order and limit
return get_data($query, "entity_row_to_elggstar");
}