Rework Profile::sidebar profile link conditions

- Now show Follow, Unfollow, Atom Feed and Message in profile sidebar more consistently with the status of the current visitor
- Remove pseudo-field contact.remoteconnect
This commit is contained in:
Hypolite Petovan 2019-06-10 21:33:25 -04:00
parent 61c79ce9ee
commit 3aebb92cf3
9 changed files with 150 additions and 175 deletions

View file

@ -186,16 +186,7 @@ function display_fetchauthor($a, $item)
$profiledata["photo"] = System::removedBaseUrl($profiledata["photo"]);
if (local_user()) {
if (in_array($profiledata["network"], [Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS])) {
$profiledata["remoteconnect"] = System::baseUrl()."/follow?url=".urlencode($profiledata["url"]);
}
} elseif ($profiledata["network"] == Protocol::DFRN) {
$connect = str_replace("/profile/", "/dfrn_request/", $profiledata["url"]);
$profiledata["remoteconnect"] = $connect;
}
return($profiledata);
return $profiledata;
}
function display_content(App $a, $update = false, $update_uid = 0)