friends not being correctly unmarked for death after contact resumed

pull/1/head
Mike Macgirvin 2010-09-17 16:50:30 -07:00
rodzic 68004fc962
commit 22429cd432
2 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -46,7 +46,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'])
);

Wyświetl plik

@ -105,12 +105,14 @@
if(intval($res->status) == 1)
mark_for_death($contact);
else {
if($contact['term-date'] != '0000-00-00 00:00:00')
unmark_for_death($contact);
}
if((intval($res->status) != 0) || (! strlen($res->challenge)) || (! strlen($res->dfrn_id)))
continue;
if($contact['term-date'] != '0000-00-00 00:00:00')
unmark_for_death($contact);
$postvars = array();