aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/relationships.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/engine/lib/relationships.php b/engine/lib/relationships.php
index 0370a1e82..4a1e4ad0f 100644
--- a/engine/lib/relationships.php
+++ b/engine/lib/relationships.php
@@ -277,6 +277,16 @@ function elgg_get_entities_from_relationship($options) {
}
$options['joins'] = array_merge($options['joins'], $clauses['joins']);
+
+ if (isset($options['selects']) && !is_array($options['selects'])) {
+ $options['selects'] = array($options['selects']);
+ } elseif (!isset($options['selects'])) {
+ $options['selects'] = array();
+ }
+
+ $select = array('r.*');
+
+ $options['selects'] = array_merge($options['selects'], $select);
}
return elgg_get_entities_from_metadata($options);