]> git.mxchange.org Git - friendica.git/blobdiff - include/update_gcontact.php
Merge remote-tracking branch 'upstream/develop' into 1705-some-more-dba
[friendica.git] / include / update_gcontact.php
index 08d4149a716343e6f0ef137cc8cde5b0e0d2476f..d283bd268931093d08ad4237b6fb0051257f99f9 100644 (file)
@@ -1,12 +1,12 @@
 <?php
 
-use \Friendica\Core\Config;
+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/probe.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"]);