X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2FContact.php;h=7cac3c0e0ca9a3b555b1569a1bb05d0461ddc418;hb=2856664eeb44bfb2b1190965562b55740dc22113;hp=3c41f7650803174fd86ef5ab04bf01a3f92661f7;hpb=ffb1997902facb36b78a7cfa522f41f2b3d71cda;p=friendica.git diff --git a/include/Contact.php b/include/Contact.php index 3c41f76508..7cac3c0e0c 100644 --- a/include/Contact.php +++ b/include/Contact.php @@ -1,6 +1,31 @@ get_baseurl()); + } +} function contact_remove($id) { @@ -13,6 +38,9 @@ function contact_remove($id) { q("DELETE FROM `photo` WHERE `contact-id` = %d ", intval($id) ); + q("DELETE FROM `mail` WHERE `contact-id` = %d ", + intval($id) + ); } @@ -46,7 +74,7 @@ function mark_for_death($contact) { if(! function_exists('unmark_for_death')) { function unmark_for_death($contact) { // It's a miracle. Our dead contact has inexplicably come back to life. - q("UPDATE `contact` SET `term-date = '%s' WHERE `id` = %d LIMIT 1", + q("UPDATE `contact` SET `term-date` = '%s' WHERE `id` = %d LIMIT 1", dbesc('0000-00-00 00:00:00'), intval($contact['id']) );