summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/ajax
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_trashbin/ajax')
-rw-r--r--apps/files_trashbin/ajax/list.php4
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();