From 73007255ceac2364f8563c84d6b46e113ff44d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Fri, 23 Dec 2016 13:44:40 +0100 Subject: [PATCH] Return last modification time to allow proper listing in cadaver Signed-off-by: Morris Jobke --- apps/dav/lib/Avatars/AvatarNode.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/apps/dav/lib/Avatars/AvatarNode.php b/apps/dav/lib/Avatars/AvatarNode.php index 0f2bfe1da43..7d606d55cba 100644 --- a/apps/dav/lib/Avatars/AvatarNode.php +++ b/apps/dav/lib/Avatars/AvatarNode.php @@ -83,11 +83,16 @@ class AvatarNode extends File { return 'image/jpeg'; } -// function getSize() { -// return $this->avatar->getFile($this->size)->getSize(); -// } - function getETag() { return $this->avatar->getFile($this->size)->getEtag(); } + + function getLastModified() { + $timestamp = $this->avatar->getFile($this->size)->getMTime(); + if (!empty($timestamp)) { + return (int)$timestamp; + } + return $timestamp; + + } }