From 3acd5dcc07f74640734b8b5a837354859dd5a213 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 9 Oct 2020 07:38:11 +0000 Subject: remove source entries for removed contacts --- include/connections.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/connections.php b/include/connections.php index 96077cd69..658fb6ee6 100644 --- a/include/connections.php +++ b/include/connections.php @@ -446,8 +446,13 @@ function contact_remove($channel_id, $abook_id) { ); $r = q("delete from abconfig where chan = %d and xchan = '%s'", - intval($channel_id), - dbesc($abook['abook_xchan']) + intval($channel_id), + dbesc($abook['abook_xchan']) + ); + + $r = q("delete from source where src_channel_id = %d and src_xchan = '%s'", + intval($channel_id), + dbesc($abook['abook_xchan']) ); return true; -- cgit v1.2.3