mirror of
https://github.com/friendica/friendica
synced 2025-04-29 00:24:24 +02:00
Added option to stay on the local machine when clicking on a contact link
This commit is contained in:
parent
0b37f1d56c
commit
5dd426f526
7 changed files with 25 additions and 5 deletions
|
@ -2578,7 +2578,7 @@ class Contact
|
|||
{
|
||||
$destination = $url ?: $contact['url']; // Equivalent to ($url != '') ? $url : $contact['url'];
|
||||
|
||||
if (!Session::isAuthenticated() || ($contact['network'] != Protocol::DFRN)) {
|
||||
if (!Session::isAuthenticated()) {
|
||||
return $destination;
|
||||
}
|
||||
|
||||
|
@ -2587,6 +2587,14 @@ class Contact
|
|||
return $url;
|
||||
}
|
||||
|
||||
if (DI::pConfig()->get(local_user(), 'system', 'stay_local') && ($url == '')) {
|
||||
return 'contact/' . $contact['id'] . '/conversations';
|
||||
}
|
||||
|
||||
if ($contact['network'] != Protocol::DFRN) {
|
||||
return $destination;
|
||||
}
|
||||
|
||||
if (!empty($contact['uid'])) {
|
||||
return self::magicLink($contact['url'], $url);
|
||||
}
|
||||
|
|
|
@ -3595,11 +3595,9 @@ class Item
|
|||
DI::page()['htmlhead'] .= Renderer::replaceMacros(Renderer::getMarkupTemplate('videos_head.tpl'));
|
||||
}
|
||||
|
||||
$url_parts = explode('/', $the_url);
|
||||
$id = end($url_parts);
|
||||
$as .= Renderer::replaceMacros(Renderer::getMarkupTemplate('video_top.tpl'), [
|
||||
'$video' => [
|
||||
'id' => $id,
|
||||
'id' => $item['author-id'],
|
||||
'title' => DI::l10n()->t('View Video'),
|
||||
'src' => $the_url,
|
||||
'mime' => $mime,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue