X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fupdate_gcontact.php;h=221c0829f50eddd6afb3a4ee9bdb82f9160b7191;hb=c9dafe3b4e835a215caf1fada142610379e0d4ef;hp=08d4149a716343e6f0ef137cc8cde5b0e0d2476f;hpb=8f7d191bfca553f9d928666e7ef3b52a26911a8e;p=friendica.git diff --git a/include/update_gcontact.php b/include/update_gcontact.php index 08d4149a71..221c0829f5 100644 --- a/include/update_gcontact.php +++ b/include/update_gcontact.php @@ -2,11 +2,11 @@ use \Friendica\Core\Config; -function update_gcontact_run(&$argv, &$argc){ +function update_gcontact_run(&$argv, &$argc) { global $a; - require_once('include/Scrape.php'); - require_once('include/socgraph.php'); + require_once 'include/Scrape.php'; + require_once 'include/socgraph.php'; logger('update_gcontact: start'); @@ -21,11 +21,13 @@ function update_gcontact_run(&$argv, &$argc){ $r = q("SELECT * FROM `gcontact` WHERE `id` = %d", intval($contact_id)); - if (!$r) + if (!dbm::_is_result($r)) { return; + } - if (!in_array($r[0]["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) + if (!in_array($r[0]["network"], array(NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS))) { return; + } $data = probe_url($r[0]["url"]);