mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:15 +01:00
Fix bug exposed by importing mixed condition true / false files
This commit is contained in:
parent
fa12444ae7
commit
2a2268f4cd
@ -175,6 +175,7 @@ class addressbook_import_contacts_csv implements importexport_iface_import_plugi
|
||||
|
||||
if ( $_definition->plugin_options['conditions'] ) {
|
||||
foreach ( $_definition->plugin_options['conditions'] as $condition ) {
|
||||
$contacts = array();
|
||||
switch ( $condition['type'] ) {
|
||||
// exists
|
||||
case 'exists' :
|
||||
@ -187,7 +188,7 @@ class addressbook_import_contacts_csv implements importexport_iface_import_plugi
|
||||
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
|
||||
$action = $condition['true'];
|
||||
foreach ( (array)$contacts as $contact ) {
|
||||
|
Loading…
Reference in New Issue
Block a user