]> source.dussan.org Git - nextcloud-server.git/commitdiff
Less aggressive caching on thumbnails too.
authorThomas Tanghus <thomas@tanghus.net>
Tue, 5 Jun 2012 23:04:59 +0000 (01:04 +0200)
committerThomas Tanghus <thomas@tanghus.net>
Tue, 5 Jun 2012 23:06:13 +0000 (01:06 +0200)
apps/contacts/thumbnail.php

index 5b340042a2503dc91a3b668a26c868a331d3e2b5..da4e930f3e5192906bbae73d97717cf68b36e254 100644 (file)
  *
  */
 
-// Init owncloud
-
 OCP\JSON::checkLoggedIn();
 //OCP\User::checkLoggedIn();
 OCP\App::checkAppEnabled('contacts');
 
 function getStandardImage(){
-       OCP\Response::setExpiresHeader('P10D');
+       //OCP\Response::setExpiresHeader('P10D');
        OCP\Response::enableCaching();
        OCP\Response::redirect(OCP\Util::imagePath('contacts', 'person.png'));
 }
@@ -59,12 +57,10 @@ $image = new OC_Image();
 $photo = $contact->getAsString('PHOTO');
 if($photo) {
        OCP\Response::setETagHeader(md5($photo));
-
        if($image->loadFromBase64($photo)) {
                if($image->centerCrop()) {
                        if($image->resize($thumbnail_size)) {
                                if($image->show()) {
-                                       // done
                                        exit();
                                } else {
                                        OCP\Util::writeLog('contacts','thumbnail.php. Couldn\'t display thumbnail for ID '.$id,OCP\Util::ERROR);