diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-05-12 12:50:27 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-05-12 12:50:27 +0200 |
commit | 9a9665f361c42764f5ae9f5f3ce63f71fdfcad5c (patch) | |
tree | ca04fac8b2ea1ca922a11fd17a7d4b913117a92e /apps/files_sharing/ajax | |
parent | f4e8de3cbbf426e7b22d5100085626b2e4fefc29 (diff) | |
parent | 61db16321f1bf7ceea22672b33cd165fc3620a4a (diff) | |
download | nextcloud-server-9a9665f361c42764f5ae9f5f3ce63f71fdfcad5c.tar.gz nextcloud-server-9a9665f361c42764f5ae9f5f3ce63f71fdfcad5c.zip |
Merge pull request #8041 from owncloud/files-sortcolumns
File list sorting by clicking on column headers
Diffstat (limited to 'apps/files_sharing/ajax')
-rw-r--r-- | apps/files_sharing/ajax/list.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/apps/files_sharing/ajax/list.php b/apps/files_sharing/ajax/list.php index 4b645496253..82bacb3d38d 100644 --- a/apps/files_sharing/ajax/list.php +++ b/apps/files_sharing/ajax/list.php @@ -20,11 +20,6 @@ * */ -// only need filesystem apps -$RUNTIME_APPTYPES=array('filesystem'); - -// Init owncloud - if(!\OC_App::isEnabled('files_sharing')){ exit; } @@ -47,6 +42,9 @@ if (isset($_GET['dir'])) { $relativePath = $_GET['dir']; } +$sortAttribute = isset( $_GET['sort'] ) ? $_GET['sort'] : 'name'; +$sortDirection = isset( $_GET['sortdirection'] ) ? ($_GET['sortdirection'] === 'desc') : false; + $data = \OCA\Files_Sharing\Helper::setupFromToken($token, $relativePath, $password); $linkItem = $data['linkItem']; @@ -64,7 +62,7 @@ $data = array(); $baseUrl = OCP\Util::linkTo('files_sharing', 'index.php') . '?t=' . urlencode($token) . '&dir='; // make filelist -$files = \OCA\Files\Helper::getFiles($dir); +$files = \OCA\Files\Helper::getFiles($dir, $sortAttribute, $sortDirection); $formattedFiles = array(); foreach ($files as $file) { |