diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-04-03 20:57:06 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-04-28 17:42:04 +0200 |
commit | 688f6162daeec724c537f9c283092f45b29b05f2 (patch) | |
tree | 27fd75f137b773b886a5d9a0d4511ff136008133 /apps/files_trashbin/ajax | |
parent | e055a411ea4b2a32dcf20c910d332867dc91f516 (diff) | |
download | nextcloud-server-688f6162daeec724c537f9c283092f45b29b05f2.tar.gz nextcloud-server-688f6162daeec724c537f9c283092f45b29b05f2.zip |
Add sorting to files list, trashbin and public files
Diffstat (limited to 'apps/files_trashbin/ajax')
-rw-r--r-- | apps/files_trashbin/ajax/list.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files_trashbin/ajax/list.php b/apps/files_trashbin/ajax/list.php index 89a55114524..e1f52e814bb 100644 --- a/apps/files_trashbin/ajax/list.php +++ b/apps/files_trashbin/ajax/list.php @@ -4,11 +4,13 @@ OCP\JSON::checkLoggedIn(); // Load the files $dir = isset( $_GET['dir'] ) ? $_GET['dir'] : ''; +$sortAttribute = isset( $_GET['sort'] ) ? $_GET['sort'] : 'name'; +$sortDirection = isset( $_GET['sortdirection'] ) ? ($_GET['sortdirection'] === 'desc') : false; $data = array(); // make filelist try { - $files = \OCA\Files_Trashbin\Helper::getTrashFiles($dir); + $files = \OCA\Files_Trashbin\Helper::getTrashFiles($dir, $sortAttribute, $sortDirection); } catch (Exception $e) { header("HTTP/1.0 404 Not Found"); exit(); |