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