summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/contacts/thumbnail.php17
1 files changed, 12 insertions, 5 deletions
diff --git a/apps/contacts/thumbnail.php b/apps/contacts/thumbnail.php
index e49098ce820..507e1c7b302 100644
--- a/apps/contacts/thumbnail.php
+++ b/apps/contacts/thumbnail.php
@@ -22,7 +22,8 @@
// Init owncloud
require_once('../../lib/base.php');
-OC_Util::checkLoggedIn();
+OC_JSON::checkLoggedIn();
+//OC_Util::checkLoggedIn();
OC_Util::checkAppEnabled('contacts');
if(!function_exists('imagecreatefromjpeg')) {
@@ -33,10 +34,16 @@ if(!function_exists('imagecreatefromjpeg')) {
}
function getStandardImage(){
- $src_img = imagecreatefrompng('img/person.png');
- header('Content-Type: image/png');
- imagepng($src_img);
- imagedestroy($src_img);
+ $date = new DateTime('now');
+ $date->add(new DateInterval('P10D'));
+ header('Expires: '.$date->format(DateTime::RFC850));
+ header('Cache-Control: cache');
+ header('Location: '.OC_Helper::imagePath('contacts', 'person.png'));
+ exit();
+// $src_img = imagecreatefrompng('img/person.png');
+// header('Content-Type: image/png');
+// imagepng($src_img);
+// imagedestroy($src_img);
}