diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-01-14 16:26:18 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-01-14 16:26:18 +0000 |
commit | be9295518a0406f72ac147ca97c86647a0cf8b65 (patch) | |
tree | 402f186ab03ec30d8bb7aac4c678fbaa2cd5b7bc /mod | |
parent | de0963eafb5143fdf44dbac17fa115deacc46453 (diff) | |
download | elgg-be9295518a0406f72ac147ca97c86647a0cf8b65.tar.gz elgg-be9295518a0406f72ac147ca97c86647a0cf8b65.tar.bz2 |
Fixed incorrect order by for search sorting.
git-svn-id: http://code.elgg.org/elgg/trunk@3809 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r-- | mod/search/start.php | 7 |
1 files changed, 3 insertions, 4 deletions
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'); |