X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fupdate_gcontact.php;h=b5ea30a0a4d8803bedb8c0a80dc02ee3d977d283;hb=810843763dcde2a004f992dc23c928a45ab8184b;hp=ce2323f1873c1537e36e5b1ec0314cf28f830d7b;hpb=721e7e410c85bd646bd9ff804c3a78aca0e9e4db;p=friendica.git diff --git a/include/update_gcontact.php b/include/update_gcontact.php index ce2323f187..b5ea30a0a4 100644 --- a/include/update_gcontact.php +++ b/include/update_gcontact.php @@ -18,6 +18,7 @@ function update_gcontact_run(&$argv, &$argc){ require_once('include/pidfile.php'); require_once('include/Scrape.php'); + require_once("include/socgraph.php"); load_config('config'); load_config('system'); @@ -54,10 +55,19 @@ function update_gcontact_run(&$argv, &$argc){ if (!$r) return; + if (!in_array($r[0]["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) + return; + $data = probe_url($r[0]["url"]); - if (!in_array($data["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) + if (!in_array($data["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) { + if ($r[0]["server_url"] != "") + poco_check_server($r[0]["server_url"], $r[0]["network"]); + + q("UPDATE `gcontact` SET `last_failure` = '%s' WHERE `id` = %d", + dbesc(datetime_convert()), intval($contact_id)); return; + } if (($data["name"] == "") AND ($r[0]['name'] != "")) $data["name"] = $r[0]['name'];