From d3a25f928980c31402df367430b183262a80e66c Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 2 Apr 2008 17:11:26 +0000 Subject: Small fix for get_entities git-svn-id: https://code.elgg.org/elgg/trunk@374 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/entities.php | 5 ++--- 1 file 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"); } -- cgit v1.2.3