diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-02-01 05:12:57 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-02-01 05:12:57 +0000 |
commit | 234847a4050b615a1cd332472299f865e77a94f9 (patch) | |
tree | 479d8d54ccec2181cdf0e203835874b7cf8a909c /engine | |
parent | ebd6eabbc2dfecc37009c4d348242293015cd024 (diff) | |
download | elgg-234847a4050b615a1cd332472299f865e77a94f9.tar.gz elgg-234847a4050b615a1cd332472299f865e77a94f9.tar.bz2 |
Fixes #1325: ElggEntities::countEntitiesFromRelationship() support inverse relationships.
git-svn-id: http://code.elgg.org/elgg/trunk@3880 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/entities.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 7d11f7214..fcf870e13 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -559,11 +559,12 @@ abstract class ElggEntity implements * Gets the number of of entities from a specific relationship type * * @param string $relationship Relationship type (eg "friends") + * @param bool $inverse_relationship * @return int|false The number of entities or false on failure */ - function countEntitiesFromRelationship($relationship) { - return get_entities_from_relationship($relationship, $this->getGUID(), false, "", "", "", - "time_created desc", null, null, true); + function countEntitiesFromRelationship($relationship, $inverse_relationship = FALSE) { + return get_entities_from_relationship($relationship, $this->getGUID(), $inverse_relationship, "", "", "", + "time_created desc", null, null, TRUE); } /** |