bugs in addressbook copy contact function
|Reported by:||JohnDoh||Owned by:|
There appear to be 2 bugs in program/steps/addressbook/copy.inc. The contact copy function does not appear to be enabled in the basic UI at the moment but I would like to use this function as part of a plugin and so have attempted to debug the code.
Source/target check fails when using the default address book, I think this is just a data typing issue, using !== rather then != appears to fix it.
As I understand it the plugin hook documentation says that only one record will be passed when create_contact but when copying multiple contacts a recordset is passed. Splitting the contact ids and processing 1 at a time fixes this.
I attach a simple patch to fix these issues but there may be a better way to do it.