diff options
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/entities.php | 5 |
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"); } |