mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 04:05:16 +02:00
Better updating of contacts
This commit is contained in:
parent
0fa84d01b0
commit
0083c16e87
2 changed files with 54 additions and 28 deletions
|
@ -2201,21 +2201,9 @@ function update_gcontact($contact) {
|
|||
}
|
||||
|
||||
if ($contact["server_url"] == "") {
|
||||
$server_url = $contact["url"];
|
||||
|
||||
$server_url = matching_url($server_url, $contact["alias"]);
|
||||
if ($server_url != "") {
|
||||
$contact["server_url"] = $server_url;
|
||||
}
|
||||
|
||||
$server_url = matching_url($server_url, $contact["photo"]);
|
||||
if ($server_url != "") {
|
||||
$contact["server_url"] = $server_url;
|
||||
}
|
||||
|
||||
$server_url = matching_url($server_url, $contact["notify"]);
|
||||
if ($server_url != "") {
|
||||
$contact["server_url"] = $server_url;
|
||||
$data = Probe::uri($contact["url"]);
|
||||
if ($data["network"] != NETWORK_PHANTOM) {
|
||||
$contact["server_url"] = $data['baseurl'];
|
||||
}
|
||||
} else {
|
||||
$contact["server_url"] = normalise_link($contact["server_url"]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue