[RCD] code bug ?

A.L.E.C alec at alec.pl
Sun Dec 8 09:31:47 CET 2013


On 12/07/2013 11:30 PM, Sébastien BLAISOT wrote:
> the root cause of all my problems is that rcube_contacts->insert returns
> the insert_id as an integer in RC 0.8 series and as a string in rc 0.9
> series.
> so this code in step/addressbook/save :
> 
>   if ($result) {
>     // LDAP DN change
>     if (*is_string($result)*&& strlen($result)>1) {
>       $newcid = $result;
>       // change cid in POST for 'show' action
>       $_POST['_cid'] = $newcid;
>     }

This code is executed after update not insert. It might happen that
update modified contact ID. That's the case for e.g. LDAP addressbooks.
When the update() do not change ID it should return boolean value.

I see rcube_contacts actually returns integer, this I will fix, but it's
not an issue here.

-- 
Aleksander 'A.L.E.C' Machniak
LAN Management System Developer [http://lms.org.pl]
Roundcube Webmail Developer  [http://roundcube.net]
---------------------------------------------------
PGP: 19359DC1 @@ GG: 2275252 @@ WWW: http://alec.pl


More information about the dev mailing list