*
*/
-// 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'));
}
$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);