From be9295518a0406f72ac147ca97c86647a0cf8b65 Mon Sep 17 00:00:00 2001 From: brettp Date: Thu, 14 Jan 2010 16:26:18 +0000 Subject: Fixed incorrect order by for search sorting. git-svn-id: http://code.elgg.org/elgg/trunk@3809 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/search/start.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'mod/search') diff --git a/mod/search/start.php b/mod/search/start.php index 4b3268f6e..91443f3c7 100644 --- a/mod/search/start.php +++ b/mod/search/start.php @@ -461,20 +461,19 @@ function search_get_order_by_sql($entities_table, $type_table, $sort, $order) { // on the entity, which we don't always know. >:O break; } - $order = strtolower($order); if ($order != 'asc' && $order != 'desc') { $order = 'DESC'; } if ($on) { - $order_by = "ORDER BY $table.$column $dir"; + $order_by = "$on $order"; } else { $order_by = ''; } - return $ob; + return $order_by; } /** Register init system event **/ -register_elgg_event_handler('init','system','search_init'); \ No newline at end of file +register_elgg_event_handler('init','system','search_init'); -- cgit v1.2.3