From 608456d2a90088e551de48439038da18a4c2a037 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Wed, 23 May 2018 14:25:51 +0200 Subject: Previews on for all trashbin files * Previews possible for all files in the trashbin * Set caching * Use the fileid to find the file * Fix test Signed-off-by: Roeland Jago Douma --- apps/files_trashbin/lib/Helper.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'apps/files_trashbin/lib/Helper.php') diff --git a/apps/files_trashbin/lib/Helper.php b/apps/files_trashbin/lib/Helper.php index 01a4fd231ea..071a1a7766a 100644 --- a/apps/files_trashbin/lib/Helper.php +++ b/apps/files_trashbin/lib/Helper.php @@ -116,10 +116,9 @@ class Helper { */ public static function formatFileInfos($fileInfos) { $files = array(); - $id = 0; foreach ($fileInfos as $i) { $entry = \OCA\Files\Helper::formatFileInfo($i); - $entry['id'] = $id++; + $entry['id'] = $i->getId(); $entry['etag'] = $entry['mtime']; // add fake etag, it is only needed to identify the preview image $entry['permissions'] = \OCP\Constants::PERMISSION_READ; $files[] = $entry; -- cgit v1.2.3