mirror of
https://github.com/friendica/friendica
synced 2025-04-26 13:10:11 +00:00
Some more checks that the gcontact table contains valid data
This commit is contained in:
parent
1627401cfa
commit
5efd25a0eb
3 changed files with 24 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue