aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-12 23:09:06 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-12 23:09:06 +0000
commit6410b8bda50dffc601e39acab807813692dd167c (patch)
tree988c294d734f77518711168f26220b8125578417
parent26847773312887a4a982e4afd457b3da5fced384 (diff)
downloadelgg-6410b8bda50dffc601e39acab807813692dd167c.tar.gz
elgg-6410b8bda50dffc601e39acab807813692dd167c.tar.bz2
Refs #2906. Missed a file.
git-svn-id: http://code.elgg.org/elgg/trunk@8185 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/metastrings.php6
1 files changed, 6 insertions, 0 deletions
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']}";