[Tickets #2623] NEW: Import uses wrong address book

bugs@bugs.horde.org bugs at bugs.horde.org
Sun Sep 18 21:26:56 PDT 2005


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

Ticket URL: http://bugs.horde.org/ticket/?id=2623
-----------------------------------------------------------------------
 Ticket             | 2623
 Created By         | tevans at tachometry.com
 Summary            | Import uses wrong address book
 Queue              | Turba
 Version            | HEAD
 State              | Unconfirmed
 Priority           | 2. Medium
 Type               | Bug
 Owners             | 
+New Attachment     | turba_source_patch.txt
-----------------------------------------------------------------------


tevans at tachometry.com (2005-09-18 21:26) wrote:

For address book import operations (including IMP address import), the Turba
'default_dir' preference is always used even when the preferred address book
is set to something else (e.g. via the IMP 'add_source' preference).

It appears that the turba/lib/base.php file is included in many of the Turba
API methods (turba/lib/api.php). However, it defines a variable ($source)
that conflicts with parameters of the same name within these methods. In the
case of an import, for example, the given method parameter is always
superceded by the setting from base.php and all imports are forced into the
default address book.

The attached patch simply checks to see whether the $source variable has
already been defined, setting it to the Turba default value only if it is
empty. 

I believe this patch will fix a few other latent bugs as well:

- Delete a single entry from non-default address book fails (see _delete)
- Strange workaround for _getContact no longer needed (per patch)
- _getContacts only works for default address book
- _addField only works for default address book

Please review and advise. Thanks!




More information about the bugs mailing list