mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 23:29:31 +01:00
Fix for import / update search for existing record. If new record key (ex ID) was not set, address search matched all
This commit is contained in:
parent
e1c084ee0c
commit
c907e92398
@ -172,14 +172,15 @@ class addressbook_import_contacts_csv implements importexport_iface_import_plugi
|
||||
switch ( $condition['type'] ) {
|
||||
// exists
|
||||
case 'exists' :
|
||||
$contacts = $this->bocontacts->search(
|
||||
//array( $condition['string'] => $record[$condition['string']],),
|
||||
'',
|
||||
$_definition->plugin_options['update_cats'] == 'add' ? false : true,
|
||||
'', '', '', false, 'AND', false,
|
||||
array( $condition['string'] => $record[$condition['string']],)
|
||||
);
|
||||
|
||||
if($record[$condition['string']]) {
|
||||
$contacts = $this->bocontacts->search(
|
||||
//array( $condition['string'] => $record[$condition['string']],),
|
||||
'',
|
||||
$_definition->plugin_options['update_cats'] == 'add' ? false : true,
|
||||
'', '', '', false, 'AND', false,
|
||||
array( $condition['string'] => $record[$condition['string']])
|
||||
);
|
||||
}
|
||||
if ( is_array( $contacts ) && count( array_keys( $contacts ) >= 1 ) ) {
|
||||
// apply action to all contacts matching this exists condition
|
||||
$action = $condition['true'];
|
||||
|
Loading…
Reference in New Issue
Block a user