summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/lib/Helper.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-05-23 14:25:51 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-06-05 10:17:22 +0200
commit608456d2a90088e551de48439038da18a4c2a037 (patch)
tree9d7616989b31a6c1bf9edafd1f7a55f8bf53ca5c /apps/files_trashbin/lib/Helper.php
parentbc008f8d5f684678242f0e2f706f8f7d28f0fe10 (diff)
downloadnextcloud-server-608456d2a90088e551de48439038da18a4c2a037.tar.gz
nextcloud-server-608456d2a90088e551de48439038da18a4c2a037.zip
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 <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_trashbin/lib/Helper.php')
-rw-r--r--apps/files_trashbin/lib/Helper.php3
1 files changed, 1 insertions, 2 deletions
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;