From 4ff3b79b99a3919235295bf9ad055ec5a52c65ab Mon Sep 17 00:00:00 2001 From: steckbrief Date: Sun, 21 Oct 2018 00:11:53 +0200 Subject: adds possibility to sort ascending or descending by timestamp --- storage-backend/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'storage-backend/index.php') diff --git a/storage-backend/index.php b/storage-backend/index.php index 77a38f0..3dd9a8f 100644 --- a/storage-backend/index.php +++ b/storage-backend/index.php @@ -80,7 +80,8 @@ switch ($method) { case 'list': $limit = getOptionalPostParameter('limit', $config['list_default_limit']); $offset = getOptionalPostParameter('offset', 0); - $files = listFiles($userJid, $limit, $offset); + $descending = getOptionalPostParameter('descending', 'false') === 'true'; + $files = listFiles($userJid, $limit, $offset, $descending); $result = ['list' => $files]; break; case 'upload': -- cgit v1.2.3