[dev] Turba Issues (?)

Michael M Slusarz slusarz at horde.org
Mon Oct 7 02:30:44 UTC 2013


Quoting Michael J Rubinsky <mrubinsk at horde.org>:

> Quoting Michael M Slusarz <slusarz at horde.org>:
>
>> A couple of Turba things I discovered when implementing the  
>> Contacts Image feature in IMP 6.2 (wanted to flag here before  
>> opening tickets to ensure they are indeed issues):
>>
>> 1. The facebook contacts driver returns EVERY record for an email  
>> search.  At least with the search as implemented in the  
>> "Addressbook" driver, namely:
>>
>>                $res = $registry->call('contacts/search', array(
>>                    $email,
>>                    array(
>>                        'customStrict' => array('email'),
>>                        'fields' =>  
>> array_fill_keys($sparams['sources'], array('email')),
>>                        'returnFields' => array('photo', 'phototype'),
>>                        'sources' => $sparams['sources']
>>                    )
>>                ));
>>
>> I can verify that NONE of the facebook contacts actually matches  
>> $email.  But they are all returned.
>
> When the driver was written, the only way to search for a "friend"  
> via the API was to know it's UID. So, in order to search we need to  
> pull the entire friend list in so we can filter the results on our  
> side.
>
> However, Turba_Driver_Facebook#_search() should be filtering the  
> results before returning them, if it's not, then this is a bug.

It is.  I will open a ticket.

>> 2. The 'photo' field in the return data (of a valid return result)  
>> is blank.  It should contain the image data.  I can verify that  
>> 'phototype' DOES correctly contain the MIME type of the photo data.
>
> Do you mean from any search call, or specific to FB?

Not sure if you saw the earlier message, but this was user error - I  
never saved my sample photo (it is a bit confusing, however, to have  
to upload a photo and then save in Turba.  I would rather see this  
save automatically on upload).

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list