aboutsummaryrefslogtreecommitdiffstats
path: root/storage-backend/index.php
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2018-10-21 00:11:53 +0200
committersteckbrief <steckbrief@chefmail.de>2018-10-21 00:11:53 +0200
commit4ff3b79b99a3919235295bf9ad055ec5a52c65ab (patch)
treeea8513d104c8810c4bd19359ed269b55faf785fe /storage-backend/index.php
parentfbd9e9bd308bda0e6bbcb34837c761065af8074b (diff)
adds possibility to sort ascending or descending by timestamp
Diffstat (limited to '')
-rw-r--r--storage-backend/index.php3
1 files changed, 2 insertions, 1 deletions
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':