From 119ec1f1425ab77ed29c696d99c0c80df3886791 Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Sat, 9 Apr 2011 17:45:42 -0400 Subject: Running egef_annotation_calculation() through elgg_get_annotations() instead of elgg_get_entities(). --- engine/lib/metastrings.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'engine/lib/metastrings.php') diff --git a/engine/lib/metastrings.php b/engine/lib/metastrings.php index 47712d3fa..6db4e6d7c 100644 --- a/engine/lib/metastrings.php +++ b/engine/lib/metastrings.php @@ -406,8 +406,18 @@ function elgg_get_metastring_based_objects($options) { } if ($options['metastring_calculation'] === ELGG_ENTITIES_NO_VALUE) { + // evalutate selects + if ($options['selects']) { + $selects = ''; + foreach ($options['selects'] as $select) { + $selects .= ", $select"; + } + } else { + $selects = ''; + } + $query = "SELECT DISTINCT n_table.*, n.string as name, - v.string as value FROM {$db_prefix}$type n_table"; + v.string as value{$selects} FROM {$db_prefix}$type n_table"; } else { $query = "SELECT {$options['metastring_calculation']}(v.string) as calculation FROM {$db_prefix}$type n_table"; } -- cgit v1.2.3