diff options
author | Florian Pritz <bluewind@xinu.at> | 2013-01-23 20:17:48 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2013-01-23 20:17:48 +0100 |
commit | 54eec0dfee36ba686cdcc4515bccea79b07c2393 (patch) | |
tree | 5421c3f2d453565968b86341706348095ad77d12 /application | |
parent | e1e658c6547a2b00a2b5b32bf3cd34ab8a5f2a52 (diff) |
Reverse sort order on upload_history
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application')
-rw-r--r-- | application/controllers/file.php | 4 |
1 files changed, 3 insertions, 1 deletions
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) { |