From fc9c6e6bfd1cf31959d79077e701b086c5d8c713 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 25 Jul 2015 20:10:42 +0200 Subject: [PATCH] Poco: always do a forced check for availability of the server --- include/socgraph.php | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/include/socgraph.php b/include/socgraph.php index a84d2d7be4..0c78cfe235 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -237,20 +237,9 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca } if ((($network == "") OR ($name == "") OR ($profile_photo == "") OR ($server_url == "")) - AND poco_reachable($profile_url, $server_url, $network)) { + AND poco_reachable($profile_url, $server_url, $network, true)) { $data = probe_url($profile_url); - // If the system doesn't seem to react, recheck the server - if ($data["network"] == NETWORK_FEED) { - logger("Recheck the server for profile ".$profile_url, LOGGER_DEBUG); - if ($server_url == "") - $url_check = poco_detect_server($profile_url); - else - $url_check = $server_url; - - poco_check_server($url_check, $network, true); - } - $network = $data["network"]; $name = $data["name"]; $nick = $data["nick"]; @@ -393,7 +382,7 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca return $gcid; } -function poco_reachable($profile, $server = "", $network = "") { +function poco_reachable($profile, $server = "", $network = "", $force = false) { if ($server == "") $server = poco_detect_server($profile); @@ -401,7 +390,7 @@ function poco_reachable($profile, $server = "", $network = "") { if ($server == "") return true; - return poco_check_server($server, $network); + return poco_check_server($server, $network, $force); } function poco_detect_server($profile) {