From f4efcff4412723c25ad91916e47219328af99d2e Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 22 Jul 2008 16:21:33 +0000 Subject: More owner_guid to container_guid transfer git-svn-id: https://code.elgg.org/elgg/trunk@1494 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/group.php | 8 ++++---- engine/lib/metadata.php | 2 +- engine/lib/relationships.php | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/engine/lib/group.php b/engine/lib/group.php index 40bf7a674..d4de615de 100644 --- a/engine/lib/group.php +++ b/engine/lib/group.php @@ -540,12 +540,12 @@ if ($owner_guid != "") { if (!is_array($owner_guid)) { $owner_guid = (int) $owner_guid; - $where[] = "e.owner_guid = '$owner_guid'"; + $where[] = "e.container_guid = '$owner_guid'"; } else if (sizeof($owner_guid) > 0) { // Cast every element to the owner_guid array to int $owner_guid = array_map("sanitise_int", $owner_guid); $owner_guid = implode(",",$owner_guid); - $where[] = "e.owner_guid in ({$owner_guid})"; + $where[] = "e.container_guid in ({$owner_guid})"; } } if ($site_guid > 0) @@ -633,9 +633,9 @@ if ($container_guid > 0) $where[] = "e.container_guid = {$container_guid}"; if (is_array($owner_guid)) { - $where[] = "e.owner_guid in (".implode(",",$owner_guid).")"; + $where[] = "e.container_guid in (".implode(",",$owner_guid).")"; } else if ($owner_guid > 0) - $where[] = "e.owner_guid = {$owner_guid}"; + $where[] = "e.container_guid = {$owner_guid}"; if (!$count) { $query = "SELECT distinct e.* "; diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php index baa02b682..efa82db01 100644 --- a/engine/lib/metadata.php +++ b/engine/lib/metadata.php @@ -598,7 +598,7 @@ if ($site_guid > 0) $where[] = "e.site_guid = {$site_guid}"; if ($owner_guid > 0) - $where[] = "e.owner_guid = {$owner_guid}"; + $where[] = "e.container_guid = {$owner_guid}"; if ($count) { $query = "SELECT count(e.guid) as total "; diff --git a/engine/lib/relationships.php b/engine/lib/relationships.php index 5313aa841..e3f2c2085 100644 --- a/engine/lib/relationships.php +++ b/engine/lib/relationships.php @@ -478,9 +478,9 @@ if ($subtype) $where[] = "e.subtype=$subtype"; if ($owner_guid != "") - $where[] = "e.owner_guid='$owner_guid'"; + $where[] = "e.container_guid='$owner_guid'"; if ($site_guid > 0) - $where[] = "e.site_guid = {$site_guid}"; + $where[] = "e.container_guid = {$site_guid}"; // Select what we're joining based on the options $joinon = "e.guid = r.guid_one"; -- cgit v1.2.3