summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/ajax/list.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_trashbin/ajax/list.php')
-rw-r--r--apps/files_trashbin/ajax/list.php29
1 files changed, 4 insertions, 25 deletions
diff --git a/apps/files_trashbin/ajax/list.php b/apps/files_trashbin/ajax/list.php
index cec18c46525..89a55114524 100644
--- a/apps/files_trashbin/ajax/list.php
+++ b/apps/files_trashbin/ajax/list.php
@@ -4,21 +4,8 @@ OCP\JSON::checkLoggedIn();
// Load the files
$dir = isset( $_GET['dir'] ) ? $_GET['dir'] : '';
-$doBreadcrumb = isset( $_GET['breadcrumb'] ) ? true : false;
$data = array();
-// Make breadcrumb
-if($doBreadcrumb) {
- $breadcrumb = \OCA\Files_Trashbin\Helper::makeBreadcrumb($dir);
-
- $breadcrumbNav = new OCP\Template('files_trashbin', 'part.breadcrumb', '');
- $breadcrumbNav->assign('breadcrumb', $breadcrumb, false);
- $breadcrumbNav->assign('baseURL', OCP\Util::linkTo('files_trashbin', 'index.php') . '?dir=');
- $breadcrumbNav->assign('home', OCP\Util::linkTo('files', 'index.php'));
-
- $data['breadcrumb'] = $breadcrumbNav->fetchPage();
-}
-
// make filelist
try {
$files = \OCA\Files_Trashbin\Helper::getTrashFiles($dir);
@@ -27,19 +14,11 @@ try {
exit();
}
-$dirlisting = false;
-if ($dir && $dir !== '/') {
- $dirlisting = true;
-}
-
$encodedDir = \OCP\Util::encodePath($dir);
-$list = new OCP\Template('files_trashbin', 'part.list', '');
-$list->assign('files', $files, false);
-$list->assign('baseURL', OCP\Util::linkTo('files_trashbin', 'index.php'). '?dir='.$encodedDir);
-$list->assign('downloadURL', OCP\Util::linkToRoute('download', array('file' => '/')));
-$list->assign('dirlisting', $dirlisting);
-$list->assign('disableDownloadActions', true);
-$data['files'] = $list->fetchPage();
+
+$data['permissions'] = 0;
+$data['directory'] = $dir;
+$data['files'] = \OCA\Files_Trashbin\Helper::formatFileInfos($files);
OCP\JSON::success(array('data' => $data));