From 54eec0dfee36ba686cdcc4515bccea79b07c2393 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Wed, 23 Jan 2013 20:17:48 +0100 Subject: Reverse sort order on upload_history Signed-off-by: Florian Pritz --- application/controllers/file.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'application') diff --git a/application/controllers/file.php b/application/controllers/file.php index 2b39309bb..6d56fa793 100644 --- a/application/controllers/file.php +++ b/application/controllers/file.php @@ -391,11 +391,13 @@ class File extends CI_Controller { $lengths[$length_key] = mb_strlen($value); } + $order = is_cli_client() ? "ASC" : "DESC"; + $query = $this->db->query(" SELECT ".implode(",", array_keys($fields))." FROM files WHERE user = ? - ORDER BY date + ORDER BY date $order ", array($user))->result_array(); foreach($query as $key => $item) { -- cgit v1.2.3-24-g4f1b