From 72ecb9e67b6cad94a98c65e02d56c5a71f879660 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 4 Oct 2015 19:39:55 +0200 Subject: [PATCH 1/2] Bugfix: Repairing a contact was more like killing the contact ... --- mod/contacts.php | 2 +- mod/follow.php | 1 + view/templates/auto_request.tpl | 2 +- view/templates/dfrn_request.tpl | 2 +- view/templates/intros.tpl | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/mod/contacts.php b/mod/contacts.php index 89154eded9..f3b8a1deff 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -243,7 +243,7 @@ function _contact_update_profile($contact_id) { return; $updatefields = array("name", "nick", "url", "addr", "batch", "notify", "poll", "request", "confirm", - "poco", "network", "alias", "pubkey"); + "poco", "network", "alias"); $update = array(); if ($data["network"] == NETWORK_OSTATUS) { diff --git a/mod/follow.php b/mod/follow.php index 7b1957c93b..8affa11b56 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -94,6 +94,7 @@ function follow_content(&$a) { '$nickname' => "", '$name' => $ret["name"], '$url' => $ret["url"], + '$zrl' => zrl($ret["url"]), '$url_label' => t("Profile URL"), '$myaddr' => $myaddr, '$request' => $request, diff --git a/view/templates/auto_request.tpl b/view/templates/auto_request.tpl index 09e6163325..f938d63719 100644 --- a/view/templates/auto_request.tpl +++ b/view/templates/auto_request.tpl @@ -28,7 +28,7 @@ {{/if}} -{{if $url}}
{{$url_label}}
{{$url}}
{{/if}} +{{if $url}}
{{$url_label}}
{{$url}}
{{/if}} {{if $location}}
{{$location_label}}
{{$location}}
{{/if}} {{if $keywords}}
{{$keywords_label}}
{{$keywords}}
{{/if}} {{if $about}}
{{$about_label}}
{{$about}}
{{/if}} diff --git a/view/templates/dfrn_request.tpl b/view/templates/dfrn_request.tpl index d376b3a5d5..178586a7b7 100644 --- a/view/templates/dfrn_request.tpl +++ b/view/templates/dfrn_request.tpl @@ -27,7 +27,7 @@ {{/if}} -{{if $url}}
{{$url_label}}
{{$url}}
{{/if}} +{{if $url}}
{{$url_label}}
{{$url}}
{{/if}} {{if $location}}
{{$location_label}}
{{$location}}
{{/if}} {{if $keywords}}
{{$keywords_label}}
{{$keywords}}
{{/if}} {{if $about}}
{{$about_label}}
{{$about}}
{{/if}} diff --git a/view/templates/intros.tpl b/view/templates/intros.tpl index 8e5a24a6b8..b9f7f15418 100644 --- a/view/templates/intros.tpl +++ b/view/templates/intros.tpl @@ -4,7 +4,7 @@

{{$str_notifytype}} {{$notify_type}}

{{$fullname|escape:'html'}} -
{{$url_label}}
{{$url}}
+
{{$url_label}}
{{$url}}
{{if $location}}
{{$location_label}}
{{$location}}
{{/if}} {{if $gender}}
{{$gender_label}}
{{$gender}}
{{/if}} {{if $keywords}}
{{$keywords_label}}
{{$keywords}}
{{/if}} From 05ae3d528e67e6bd49336aaa53f5ba1f30f1c46d Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 4 Oct 2015 19:48:29 +0200 Subject: [PATCH 2/2] A contact that couldn't be resolved is know known as "UNKNOWN" --- mod/contacts.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/contacts.php b/mod/contacts.php index f3b8a1deff..92463cd8de 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -238,8 +238,8 @@ function _contact_update_profile($contact_id) { $data = probe_url($r[0]["url"]); - // "Feed" is mostly a sign of communication problems - if (($data["network"] == NETWORK_FEED) AND ($data["network"] != $r[0]["network"])) + // "Feed" or "Unknown" is mostly a sign of communication problems + if ((in_array($data["network"], array(NETWORK_FEED, NETWORK_PHANTOM))) AND ($data["network"] != $r[0]["network"])) return; $updatefields = array("name", "nick", "url", "addr", "batch", "notify", "poll", "request", "confirm",