]> git.mxchange.org Git - friendica.git/blobdiff - mod/contacts.php
Merge pull request #5796 from JonnyTischbein/issue_5547
[friendica.git] / mod / contacts.php
index 70a582c6ee36b729111d652cc1c985049138238e..1604f0b6605ec43d6f0e936972ad2394a45c11f2 100644 (file)
@@ -47,6 +47,11 @@ function contacts_init(App $a)
                if (!DBA::isResult($contact)) {
                        $contact = DBA::selectFirst('contact', [], ['id' => $contact_id, 'uid' => 0]);
                }
+
+               // Don't display contacts that are about to be deleted
+               if ($contact['network'] == Protocol::PHANTOM) {
+                       $contact = false;
+               }
        }
 
        if (DBA::isResult($contact)) {
@@ -368,7 +373,7 @@ function _contact_drop($orig_record)
                return;
        }
 
-       Contact::terminateFriendship($r[0], $orig_record);
+       Contact::terminateFriendship($r[0], $orig_record, true);
        Contact::remove($orig_record['id']);
 }
 
@@ -719,6 +724,8 @@ function contacts_content(App $a, $update = 0)
                $sql_extra = " AND `blocked` = 0 ";
        }
 
+       $sql_extra .= sprintf(" AND `network` != '%s' ", Protocol::PHANTOM);
+
        $search = x($_GET, 'search') ? notags(trim($_GET['search'])) : '';
        $nets   = x($_GET, 'nets'  ) ? notags(trim($_GET['nets']))   : '';