]> git.mxchange.org Git - friendica.git/blobdiff - include/Scrape.php
Some more checks that the gcontact table contains valid data
[friendica.git] / include / Scrape.php
index 84257f4811aac6e3d132af29475475c82ddd17df..542adc22abeb5aeb4564ae4e9099e411c78da25f 100644 (file)
@@ -799,6 +799,9 @@ function probe_url($url, $mode = PROBE_NORMAL, $level = 1) {
        if (substr($baseurl, -10) == "/index.php")
                $baseurl = str_replace("/index.php", "", $baseurl);
 
+       if ($network == "")
+               $network = NETWORK_PHANTOM;
+
        $baseurl = rtrim($baseurl, "/");
 
        if(strpos($url,'@') AND ($addr == "") AND ($network == NETWORK_DFRN))
@@ -846,7 +849,7 @@ function probe_url($url, $mode = PROBE_NORMAL, $level = 1) {
        }
 
        // Only store into the cache if the value seems to be valid
-       if (!in_array($result['network'], array(NETWORK_PHANTOM, ""))) {
+       if ($result['network'] != NETWORK_PHANTOM) {
                Cache::set("probe_url:".$mode.":".$original_url,serialize($result), CACHE_DAY);
 
                /// @todo temporary fix - we need a real contact update function that updates only changing fields