[Tickets #7407] Re: Photos: storing in LDAP and broken contact sync

bugs at horde.org bugs at horde.org
Sun Mar 22 14:44:24 UTC 2009


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/7407
------------------------------------------------------------------------------
  Ticket             | 7407
  Updated By         | xk3 at mompl.org
  Summary            | Photos: storing in LDAP and broken contact sync
  Queue              | Turba
  Version            | 2.3
  Type               | Bug
  State              | Assigned
  Priority           | 2. Medium
  Milestone          |
  Patch              | 1
  Owners             | Jan Schneider
------------------------------------------------------------------------------


xk3 at mompl.org (2009-03-22 10:44) wrote:

     * Horde: 3.3.3
     * Turba: H3 (2.3.1)

I would like to add a comment on syncing photos with Nokia E51: data  
from the phone is parsed ok now, but syncing to the phone still needs  
some tweaking: I added the following function in  
./lib/SyncML/Device/Nokia.php

function convertServer2Client($content, $contentType, $database)
{
   list($content, $contentType) =
     parent::convertServer2Client($content, $contentType);

     $content =  
preg_replace('/(\r\n|\r|\n)PHOTO;ENCODING=b[^:]*:(.+?)(\r\n|\r|\n)/',
       '\1PHOTO;ENCODING=BASE64:\1\2\1\1',
       $content, 1);

     $GLOBALS['backend']->logFile(
       SYNCML_LOGFILE_DATA,
       "\noutput converted for client ($contentType):\n$content\n");
     return array($content, $contentType);
}

Reasons:
a) Nokia expects "BASE64" as encoding string, not "b" (which is base64)
b) Extra file type info confuses the phone, so strip everything else  
before ":"
c) base64 has to end with an extra blank line (the double \1\1)


Finally, the problem 1) of comment #1 of this ticket is still not  
solved. I still have to patch the function _emptyAttributeFilter.

cheers,
    Martin







More information about the bugs mailing list