"fixed photo handling as suggested by tolux <5408w1h2dkm3c7r(at)bodhi.lawlita.com> on the developer list"

This commit is contained in:
Ralf Becker 2008-04-16 04:37:05 +00:00
parent e2d0b93353
commit 09cdf3efe1

View File

@ -92,8 +92,11 @@ class vcaladdressbook extends bocontacts
case 'jpegphoto':
if(!empty($value))
{
error_log("PHOTO='".$value."'");
$hasdata++;
//error_log("PHOTO='".$value."'");
$options['ENCODING'] = 'BASE64';
$options['TYPE'] = 'JPEG';
$value = base64_encode($value);
$hasdata++;
}
break;
@ -244,6 +247,7 @@ class vcaladdressbook extends bocontacts
'ROLE' => array('role'),
'URL;HOME' => array('url_home'),
'FBURL' => array('freebusy_uri'),
'PHOTO' => array('jpegphoto'),
);
$defaultFields[2] = array( // sony ericson
@ -376,7 +380,7 @@ class vcaladdressbook extends bocontacts
'CATEGORIES' => array('cat_id'),
'NOTE' => array('note'),
'X-EVOLUTION-ASSISTANT' => array('assistent'),
// segmentation fault ? 'PHOTO;JPEG' => array('jpegphoto'),
'PHOTO' => array('jpegphoto'),
);