aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/relationships.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/relationships.php')
-rw-r--r--engine/lib/relationships.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/engine/lib/relationships.php b/engine/lib/relationships.php
index 071e5ece2..f6fa0f945 100644
--- a/engine/lib/relationships.php
+++ b/engine/lib/relationships.php
@@ -394,7 +394,7 @@
if ($relationship!="")
$where[] = "r.relationship='$relationship'";
if ($relationship_guid)
- $where[] = ($inverse_relationship ? "r.guid_one='$relationship'" : "r.guid_two='$relationship'");
+ $where[] = ($inverse_relationship ? "r.guid_one='$relationship_guid'" : "r.guid_two='$relationship_guid'");
if ($type != "")
$where[] = "e.type='$type'";
if ($subtype)
@@ -417,7 +417,7 @@
$query .= " $w and ";
$query .= " (e.access_id in {$access} or (e.access_id = 0 and e.owner_guid = {$_SESSION['id']}))"; // Add access controls
if (!$count) {
- $query .= " order by $order_by limit $limit, $offset"; // Add order and limit
+ $query .= " order by $order_by limit $offset, $limit"; // Add order and limit
return get_data($query, "entity_row_to_elggstar");
} else {
if ($count = get_data_row($query)) {