From 6410b8bda50dffc601e39acab807813692dd167c Mon Sep 17 00:00:00 2001 From: brettp Date: Sat, 12 Feb 2011 23:09:06 +0000 Subject: Refs #2906. Missed a file. git-svn-id: http://code.elgg.org/elgg/trunk@8185 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/metastrings.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'engine/lib') diff --git a/engine/lib/metastrings.php b/engine/lib/metastrings.php index 6009f0882..23724b979 100644 --- a/engine/lib/metastrings.php +++ b/engine/lib/metastrings.php @@ -396,6 +396,12 @@ function elgg_get_metastring_based_objects($options, $type = 'metadata') { // Add access controls $query .= get_access_sql_suffix('e'); + + // reverse order by + if ($options['reverse_order_by']) { + $options['order_by'] = elgg_sql_reverse_order_by_clause($options['order_by'], $defaults['order_by']); + } + if ($options['metastring_calculation'] === ELGG_ENTITIES_NO_VALUE) { if ($options['group_by'] = sanitise_string($options['group_by'])) { $query .= " GROUP BY {$options['group_by']}"; -- cgit v1.2.3