From 941beda15996631739e1b65696bdad34541db029 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 17 Jan 2019 15:56:21 +0100 Subject: [PATCH] Fix cache control not being set for lavatar --- api/src/Contacts.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/api/src/Contacts.php b/api/src/Contacts.php index 85dba430df..f6ec58fb21 100755 --- a/api/src/Contacts.php +++ b/api/src/Contacts.php @@ -2616,14 +2616,12 @@ class Contacts extends Contacts\Storage if (is_array($contact)) { header('Content-type: image/jpeg'); - echo \EGroupware\Api\avatar::lavatar(array( + $contact['jpegphoto'] = \EGroupware\Api\avatar::lavatar(array( 'id' => $contact['id'], 'firstname' => $contact['n_given'], 'lastname' => $contact['n_family']) ); - exit(); } - Egw::redirect(\EGroupware\Api\Image::find('addressbook','photo')); } // use an etag over the image mapp @@ -2655,5 +2653,6 @@ class Contacts extends Contacts\Storage } exit(); } + Egw::redirect(\EGroupware\Api\Image::find('addressbook','photo')); } }