From 64e77f6f50033bae7b851dc4ec5763d86fd7c496 Mon Sep 17 00:00:00 2001 From: ralf Date: Mon, 29 Jan 2024 17:35:22 +0200 Subject: [PATCH] fix manual initial import cancels async job of automatic import also do not log DN as updated in contact-data --- api/src/Accounts/Import.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/src/Accounts/Import.php b/api/src/Accounts/Import.php index 4b5f16d193..d3aa654ea9 100644 --- a/api/src/Accounts/Import.php +++ b/api/src/Accounts/Import.php @@ -444,7 +444,7 @@ class Import })); // files need to be or'ed with the sql value, as otherwise e.g. picture would disappear $to_update['files'] |= $sql_contact['files']; - unset($to_update['account_id']); // no need to update, specially as account_id might be different! + unset($to_update['account_id'], $to_update['dn']); // no need to update, specially as account_id might be different! $to_update['id'] = $sql_contact['id']; if (($diff = array_diff_assoc($to_update, $sql_contact))) { @@ -624,7 +624,8 @@ class Import } $this->logger($result, 'info'); - if (!$dry_run && $initial_import && self::installAsyncJob()) + if (!$dry_run && $initial_import && self::installAsyncJob((float)$GLOBALS['egw_info']['server']['account_import_frequency'] ?? 0.0, + $GLOBALS['egw_info']['server']['account_import_time'] ?? null)) { $this->logger('Async job for periodic import installed', 'info'); }