From 03848a78b520ffd72a6312e111861b2912508a56 Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 30 Apr 2008 16:14:15 +0000 Subject: Fix for previous fix git-svn-id: https://code.elgg.org/elgg/trunk@586 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/relationships.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/lib/relationships.php b/engine/lib/relationships.php index 189bda989..4b7e61360 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_guid'" : "r.guid_two='$relationship_guid'"); + $where[] = ($inverse_relationship ? "r.guid_two='$relationship_guid'" : "r.guid_one='$relationship_guid'"); if ($type != "") $where[] = "e.type='$type'"; if ($subtype) @@ -403,9 +403,9 @@ $where[] = "e.owner_guid='$owner_guid'"; // Select what we're joining based on the options - $joinon = "e.guid = r.guid_two"; + $joinon = "e.guid = r.guid_one"; if (!$inverse_relationship) - $joinon = "e.guid = r.guid_one"; + $joinon = "e.guid = r.guid_two"; if ($count) { $query = "select count(distinct e.id) as total "; -- cgit v1.2.3