6.0.0-git
2018-12-15

[#14789] BugFix CLI import + delete previous data on CLI import
Summary BugFix CLI import + delete previous data on CLI import
Queue Turba
Queue Version 4.2.21
Type Enhancement
State New
Priority 2. Medium
Owners
Requester lucabert (at) lucabert (dot) de
Created 2018-03-04 (286 days ago)
Due
Updated 2018-03-04 (286 days ago)
Assigned
Resolved
Milestone
Patch Yes

History
2018-03-04 07:29:07 lucabert (at) lucabert (dot) de Comment #1
Type ⇒ Enhancement
State ⇒ New
Priority ⇒ 2. Medium
Summary ⇒ BugFix CLI import + delete previous data on CLI import
Queue ⇒ Turba
Milestone ⇒
Patch ⇒ Yes
New Attachment: turba-import.patch Download
Reply to this comment
BugFix:
CLI import always said that no address book was found (see thread 
https://lists.horde.org/archives/turba/Week-of-Mon-20180219/007236.html).
The problem was that if IMAP ist used to authenticate the user the IMP 
module must be loaded.

Enhancement:
A very useful option to allow deleting all previous data in an address 
book to avoid duplicated entries and/or old entries no more valid.
Since calling

$injector->getInstance('Turba_Factory_Driver')->create($source)->deleteAll();

from outside the Api-class always results in an error that the source 
does not exists, I added the feature to allow the user deleting all 
previous data in an address book by passing the option 
'delete_previous' to the import function.

A patch for the BugFix and the enhancement (files: turba/lib/Api.php 
and turba-import-vcards) is attached.
In this version of turba-import-vcards the option to purge previous 
data is default.

I hope these fixes will be soon imported in the main code of Horde.

Saved Queries