[sync] Sync with Nokia (N80) phones

Andy Wright horde at eltofts.homelinux.com
Mon Feb 12 04:55:52 PST 2007


Karsten Fourmont wrote:
> Andy Wright wrote:
>> I tried to logMessage the content of $contentType and it seems to be 
>> empty.
>
> Right, that should be the  the reason.
> I don't have access to cvs right now: can you just replace 
> getPreferredContentType() in Device.php with the function below and 
> give it a try?
>
> Cheers,
>  Karsten
>
> function getPreferredContentType($database)
>     {
>         /* Use some wild guessings. */
>         if (strpos($database, 'contacts') !== false) {
>             return 'text/x-vcard';
>         } elseif (strpos($database, 'notes') !== false ||
>                   strpos($database, 'memo') !== false) {
>             return 'text/x-vnote';
>         } elseif (strpos($database, 'tasks') !== false) {
>             return 'text/x-vtodo';
>         } elseif (strpos($database, 'calendar') !== false ||
>                   strpos($database, 'events') !== false) {
>             return 'text/calendar';
>         }
>     }
>
That works nicely :)

Andy.


More information about the sync mailing list