mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-24 07:39:27 +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'] ) {
|
switch ( $condition['type'] ) {
|
||||||
// exists
|
// exists
|
||||||
case 'exists' :
|
case 'exists' :
|
||||||
$contacts = $this->bocontacts->search(
|
if($record[$condition['string']]) {
|
||||||
//array( $condition['string'] => $record[$condition['string']],),
|
$contacts = $this->bocontacts->search(
|
||||||
'',
|
//array( $condition['string'] => $record[$condition['string']],),
|
||||||
$_definition->plugin_options['update_cats'] == 'add' ? false : true,
|
'',
|
||||||
'', '', '', false, 'AND', false,
|
$_definition->plugin_options['update_cats'] == 'add' ? false : true,
|
||||||
array( $condition['string'] => $record[$condition['string']],)
|
'', '', '', false, 'AND', false,
|
||||||
);
|
array( $condition['string'] => $record[$condition['string']])
|
||||||
|
);
|
||||||
|
}
|
||||||
if ( is_array( $contacts ) && count( array_keys( $contacts ) >= 1 ) ) {
|
if ( is_array( $contacts ) && count( array_keys( $contacts ) >= 1 ) ) {
|
||||||
// apply action to all contacts matching this exists condition
|
// apply action to all contacts matching this exists condition
|
||||||
$action = $condition['true'];
|
$action = $condition['true'];
|
||||||
|
Loading…
Reference in New Issue
Block a user