diff options
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'); |