]> git.mxchange.org Git - friendica.git/blobdiff - include/Contact.php
Issue 2957: The avatar problem with mastodon should now finally be solved
[friendica.git] / include / Contact.php
index 85dc1008eb674c9c2fe08355c052e222c1b165fd..fc9f660f1377e81aba7ae63f274f9dff1a418302 100644 (file)
@@ -127,7 +127,7 @@ function mark_for_death($contact) {
        if($contact['archive'])
                return;
 
-       if($contact['term-date'] == '0000-00-00 00:00:00') {
+       if ($contact['term-date'] <= NULL_DATE) {
                q("UPDATE `contact` SET `term-date` = '%s' WHERE `id` = %d",
                                dbesc(datetime_convert()),
                                intval($contact['id'])
@@ -185,13 +185,13 @@ 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",
-               dbesc('0000-00-00 00:00:00'),
+               dbesc(NULL_DATE),
                intval($contact['id'])
        );
 
        if ($contact['url'] != '') {
                q("UPDATE `contact` SET `term-date` = '%s' WHERE `nurl` = '%s'",
-                       dbesc('0000-00-00 00:00:00'),
+                       dbesc(NULL_DATE),
                        dbesc(normalise_link($contact['url']))
                );
        }
@@ -715,7 +715,7 @@ function posts_from_gcontact(App $a, $gcontact_id) {
                intval($a->pager['itemspage'])
        );
 
-       $o = conversation($a,$r,'community',false);
+       $o = conversation($a, $r, 'community', false);
 
        $o .= alt_pager($a, count($r));
 
@@ -758,7 +758,7 @@ function posts_from_contact_url(App $a, $contact_url) {
                intval($a->pager['itemspage'])
        );
 
-       $o = conversation($a,$r,'community',false);
+       $o = conversation($a, $r, 'community', false);
 
        $o .= alt_pager($a, count($r));