diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-04-14 23:06:51 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-04-14 23:06:51 +0000 |
commit | e60d45a1e8025a10220a42285d3ff17335af5214 (patch) | |
tree | 47637729aea23c056f2c503715966712fd08f11d /engine/lib/metastrings.php | |
parent | 842031dd358282f608c232094422cd281117c21f (diff) | |
download | elgg-e60d45a1e8025a10220a42285d3ff17335af5214.tar.gz elgg-e60d45a1e8025a10220a42285d3ff17335af5214.tar.bz2 |
Refs #3195. Changed the way annotation calculations are performed. Seems to be working better, but will want to test more before closing.
git-svn-id: http://code.elgg.org/elgg/trunk@9000 36083f99-b078-4883-b0ff-0f9b5a30f544
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 913d33a7d..604c7f765 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"; } |