better handling of dead contacts

This commit is contained in:
friendica 2012-06-14 16:56:46 -07:00
parent 79e2ae3791
commit be090cc851
6 changed files with 91 additions and 65 deletions

View file

@ -139,6 +139,10 @@ function terminate_friendship($user,$self,$contact) {
if(! function_exists('mark_for_death')) {
function mark_for_death($contact) {
if($contact['archive'])
return;
if($contact['term-date'] == '0000-00-00 00:00:00') {
q("UPDATE `contact` SET `term-date` = '%s' WHERE `id` = %d LIMIT 1",
dbesc(datetime_convert()),