Summary | Import uses wrong address book |
Queue | Turba |
Queue Version | HEAD |
Type | Bug |
State | Resolved |
Priority | 2. Medium |
Owners | |
Requester | tevans (at) tachometry (dot) com |
Created | 09/19/2005 (7235 days ago) |
Due | |
Updated | 09/19/2005 (7235 days ago) |
Assigned | |
Resolved | 09/19/2005 (7235 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
request variable (like cookie) if someone enabled register_globals.
I picked up your change to my patch, but unfortunately it doesn't
work. The API method parameters are not registered as global
variables, so the Util::nonInputVar method always returns null and the
method parameter value is still overwritten.
Is there something wrong with "if (empty($source)) { ... }" that I may
have overlooked? I want to ensure that any value currently set is not
overwritten.
Thanks,
Tom
State ⇒ Resolved
than the former solution. Tweaked and committed, thanks.
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Import uses wrong address book
Queue ⇒ Turba
New Attachment: turba_source_patch.txt
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!