aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/entities.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/entities.php')
-rw-r--r--engine/lib/entities.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 8a532b275..d52b86005 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -563,8 +563,13 @@ abstract class ElggEntity implements
* @return array|false An array of entities or false on failure
*/
function getEntitiesFromRelationship($relationship, $inverse = false, $limit = 50, $offset = 0) {
- return get_entities_from_relationship($relationship, $this->getGUID(), $inverse,
- "", "", "", "time_created desc", $limit, $offset);
+ return elgg_get_entities_from_relationship(array(
+ 'relationship' => $relationship,
+ 'relationship_guid' => $this->getGUID(),
+ 'inverse_relationship' => $inverse,
+ 'limit' => $limit,
+ 'offset' => $offset
+ ));
}
/**
@@ -575,8 +580,12 @@ abstract class ElggEntity implements
* @return int|false The number of entities or false on failure
*/
function countEntitiesFromRelationship($relationship, $inverse_relationship = FALSE) {
- return get_entities_from_relationship($relationship, $this->getGUID(), $inverse_relationship, "", "", "",
- "time_created desc", null, null, TRUE);
+ return elgg_get_entities_from_relationship(array(
+ 'relationship' => $relationship,
+ 'relationship_guid' => $this->getGUID(),
+ 'inverse_relationship' => $inverse_relationship,
+ 'count' => TRUE
+ ));
}
/**