]> git.mxchange.org Git - friendica.git/commitdiff
friends not being correctly unmarked for death after contact resumed
authorMike Macgirvin <mike@macgirvin.com>
Fri, 17 Sep 2010 23:50:30 +0000 (16:50 -0700)
committerMike Macgirvin <mike@macgirvin.com>
Fri, 17 Sep 2010 23:50:30 +0000 (16:50 -0700)
include/Contact.php
include/poller.php

index 3c41f7650803174fd86ef5ab04bf01a3f92661f7..c59038e5d7528f281af2e8a96c2a035b586c2d09 100644 (file)
@@ -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'])
        );
index f116a5622054c6611337d84f305d736b3ed00b7e..0980ca1fa5faa5b0ecfd01cbd716ec06128466d7 100644 (file)
 
                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();