mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-05 13:00:14 +01:00
Fix bug in condition matching on account ID, if account ID is not in file
This commit is contained in:
parent
a679a49196
commit
abe6ce3482
@ -123,11 +123,17 @@ class admin_import_groups_csv implements importexport_iface_import_plugin {
|
|||||||
switch ( $condition['type'] ) {
|
switch ( $condition['type'] ) {
|
||||||
// exists
|
// exists
|
||||||
case 'exists' :
|
case 'exists' :
|
||||||
|
$accounts = array();
|
||||||
|
|
||||||
|
// Skip the search if the field is empty
|
||||||
|
if($record[$condition['string']] !== '') {
|
||||||
|
|
||||||
$accounts = $GLOBALS['egw']->accounts->search(array(
|
$accounts = $GLOBALS['egw']->accounts->search(array(
|
||||||
'type' => 'groups',
|
'type' => 'groups',
|
||||||
'query' => $record[$condition['string']],
|
'query' => $record[$condition['string']],
|
||||||
'query_type' => $condition['string']
|
'query_type' => $condition['string']
|
||||||
));
|
));
|
||||||
|
}
|
||||||
if ( is_array( $accounts ) && count( $accounts ) >= 1 ) {
|
if ( is_array( $accounts ) && count( $accounts ) >= 1 ) {
|
||||||
$account = current($accounts);
|
$account = current($accounts);
|
||||||
// apply action to all contacts matching this exists condition
|
// apply action to all contacts matching this exists condition
|
||||||
|
Loading…
Reference in New Issue
Block a user