Added option to stay on the local machine when clicking on a contact link

This commit is contained in:
Michael 2020-09-30 17:30:26 +00:00
parent 0b37f1d56c
commit 5dd426f526
7 changed files with 25 additions and 5 deletions

View file

@ -49,6 +49,13 @@ class Hovercard extends BaseModule
// the real url (nurl)
if (strpos($contact_url, 'redir/') === 0) {
$cid = intval(substr($contact_url, 6));
}
if (strpos($contact_url, 'contact/') === 0) {
$cid = intval(substr($contact_url, 8));
}
if (!empty($cid)) {
$remote_contact = Contact::selectFirst(['nurl'], ['id' => $cid]);
$contact_url = $remote_contact['nurl'] ?? '';
}