diff options
author | Brett Profitt <brett.profitt@gmail.com> | 2011-04-09 17:45:42 -0400 |
---|---|---|
committer | Brett Profitt <brett.profitt@gmail.com> | 2011-04-09 17:45:42 -0400 |
commit | 119ec1f1425ab77ed29c696d99c0c80df3886791 (patch) | |
tree | 7a73246f1343dc93469e1b5f45feadd636b97c63 /engine/lib/metastrings.php | |
parent | 2e51b49335c7cd23a7d64383621a7009368c16e3 (diff) | |
download | elgg-119ec1f1425ab77ed29c696d99c0c80df3886791.tar.gz elgg-119ec1f1425ab77ed29c696d99c0c80df3886791.tar.bz2 |
Running egef_annotation_calculation() through elgg_get_annotations() instead of elgg_get_entities().
Diffstat (limited to 'engine/lib/metastrings.php')
-rw-r--r-- | engine/lib/metastrings.php | 12 |
1 files changed, 11 insertions, 1 deletions
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"; } |