diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-04-30 15:51:47 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-04-30 15:51:47 +0000 |
commit | 79d59633b62577ae6d1d889bae14180be4e95727 (patch) | |
tree | 620df59b463d4ec024aceaae9c01ce0e463e8c3a /engine/lib | |
parent | df57177721d5a06fcb3069a97b7da78c24d2fae4 (diff) | |
download | elgg-79d59633b62577ae6d1d889bae14180be4e95727.tar.gz elgg-79d59633b62577ae6d1d889bae14180be4e95727.tar.bz2 |
Fixing some functions relating to relationships
git-svn-id: https://code.elgg.org/elgg/trunk@584 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/entities.php | 4 | ||||
-rw-r--r-- | engine/lib/relationships.php | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 0fcca87f5..087a33e1c 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -261,7 +261,7 @@ * @return array|false An array of entities or false on failure
*/
function getEntitiesFromRelationship($relationship, $limit = 50, $offset = 0) {
- return get_entities_from_relationship($relationship,$this->getGUID(),false,"","",9,"time_created desc",$limit,$offset);
+ return get_entities_from_relationship($relationship,$this->getGUID(),false,"","","","time_created desc",$limit,$offset);
}
/**
@@ -271,7 +271,7 @@ * @return int|false The number of entities or false on failure
*/
function countEntitiesFromRelationship($relationship) {
- return get_entities_from_relationship($relationship,$this->getGUID(),false,"","",9,"time_created desc",$limit,$offset,true);
+ return get_entities_from_relationship($relationship,$this->getGUID(),false,"","","","time_created desc",$limit,$offset,true);
}
/**
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)) {
|