aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-30 16:14:15 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-30 16:14:15 +0000
commit03848a78b520ffd72a6312e111861b2912508a56 (patch)
tree1c1e9ecc3b4d6eb79d3206fec8a7f3fea5a53726 /engine/lib
parenta3eee5aa15c96727a3166b738d7e0b07bf5ab1ba (diff)
downloadelgg-03848a78b520ffd72a6312e111861b2912508a56.tar.gz
elgg-03848a78b520ffd72a6312e111861b2912508a56.tar.bz2
Fix for previous fix
git-svn-id: https://code.elgg.org/elgg/trunk@586 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/relationships.php6
1 files 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 ";