From 1c6bf7d25aeb850ed4072ed80291c94c025d5b47 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 10 Jun 2019 08:21:06 -0400 Subject: [PATCH 1/6] Add App parameter to Module\Profile::sidebar method prototype --- src/Model/Profile.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Model/Profile.php b/src/Model/Profile.php index 9068943dfe..36a33876e7 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -117,7 +117,7 @@ class Profile if (count($profiledata) > 0) { // Add profile data to sidebar - $a->page['aside'] .= self::sidebar($profiledata, true, $show_connect); + $a->page['aside'] .= self::sidebar($a, $profiledata, true, $show_connect); if (!DBA::isResult($user)) { return; @@ -188,7 +188,7 @@ class Profile * But: When this profile was on the same server, then we could display the contacts */ if (!$profiledata) { - $a->page['aside'] .= self::sidebar($a->profile, $block, $show_connect); + $a->page['aside'] .= self::sidebar($a, $a->profile, $block, $show_connect); } return; @@ -280,10 +280,8 @@ class Profile * @hooks 'profile_sidebar' * array $arr */ - private static function sidebar($profile, $block = 0, $show_connect = true) + private static function sidebar(App $a, $profile, $block = 0, $show_connect = true) { - $a = \get_app(); - $o = ''; $location = false; From 0fbfb7c970d5a2b7ecc8fb3cf301422d84adefff Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 10 Jun 2019 19:10:39 -0400 Subject: [PATCH 2/6] Prevents an endless loop when only the non-public contact is available in Contact::magicLinkByContact --- src/Model/Contact.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Model/Contact.php b/src/Model/Contact.php index a0bbdd1049..01c30fad71 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -2355,6 +2355,9 @@ class Contact extends BaseObject return $url ?: $contact_url; // Equivalent to: ($url != '') ? $url : $contact_url; } + // Prevents endless loop in case only a non-public contact exists for the contact URL + unset($data['uid']); + return self::magicLinkByContact($data, $contact_url); } From 61c79ce9ee763f563afeb3074c1aaf895a647009 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 10 Jun 2019 21:29:11 -0400 Subject: [PATCH 3/6] Add new Model\Contact::canReceivePrivateMessages method --- src/Model/Contact.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 01c30fad71..36a424b983 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -894,7 +894,7 @@ class Contact extends BaseObject // If there is more than one entry we filter out the connector networks if (count($r) > 1) { foreach ($r as $id => $result) { - if ($result["network"] == Protocol::STATUSNET) { + if (!in_array($result["network"], Protocol::NATIVE_SUPPORT)) { unset($r[$id]); } } @@ -1078,7 +1078,7 @@ class Contact extends BaseObject $profile_link = $profile_link . '?tab=profile'; } - if (in_array($contact['network'], [Protocol::DFRN, Protocol::DIASPORA]) && !$contact['self']) { + if (self::canReceivePrivateMessages($contact)) { $pm_url = System::baseUrl() . '/message/new/' . $contact['id']; } @@ -2447,4 +2447,18 @@ class Contact extends BaseObject // Is it a forum? return ($contact['forum'] || $contact['prv']); } + + /** + * Can the remote contact receive private messages? + * + * @param array $contact + * @return bool + */ + public static function canReceivePrivateMessages(array $contact) + { + $protocol = $contact['network'] ?? $contact['protocol'] ?? Protocol::PHANTOM; + $self = $contact['self'] ?? false; + + return in_array($protocol, [Protocol::DFRN, Protocol::DIASPORA, Protocol::ACTIVITYPUB]) && !$self; + } } From 3aebb92cf3e9248dc4c6871b1f43cc02bdf28bfe Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 10 Jun 2019 21:33:25 -0400 Subject: [PATCH 4/6] 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 --- mod/display.php | 11 +- src/Model/Contact.php | 14 ++ src/Model/Profile.php | 202 ++++++++---------- src/Module/Contact.php | 4 - view/templates/profile_vcard.tpl | 19 +- .../duepuntozero/templates/profile_vcard.tpl | 19 +- view/theme/frio/templates/profile_vcard.tpl | 18 +- .../theme/quattro/templates/profile_vcard.tpl | 19 +- view/theme/vier/templates/profile_vcard.tpl | 19 +- 9 files changed, 150 insertions(+), 175 deletions(-) diff --git a/mod/display.php b/mod/display.php index fa5b2e1962..017b3545b6 100644 --- a/mod/display.php +++ b/mod/display.php @@ -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) diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 36a424b983..73118be0d0 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -124,6 +124,20 @@ class Contact extends BaseObject return DBA::toArray($statement); } + /** + * @param array $fields Array of selected fields, empty for all + * @param array $condition Array of fields for condition + * @param array $params Array of several parameters + * @return array + * @throws \Exception + */ + public static function selectFirst(array $fields = [], array $condition = [], array $params = []) + { + $contact = DBA::selectFirst('contact', $fields, $condition, $params); + + return $contact; + } + /** * @param integer $id Contact ID * @param array $fields Array of selected fields, empty for all diff --git a/src/Model/Profile.php b/src/Model/Profile.php index 36a33876e7..4cda6e452a 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -18,6 +18,7 @@ use Friendica\Core\Logger; use Friendica\Core\PConfig; use Friendica\Core\Protocol; use Friendica\Core\Renderer; +use Friendica\Core\Session; use Friendica\Core\System; use Friendica\Core\Worker; use Friendica\Database\DBA; @@ -302,127 +303,102 @@ class Profile Hook::callAll('profile_sidebar_enter', $profile); + if (isset($profile['url'])) { + $profile_url = $profile['url']; + } else { + $profile_url = System::baseUrl() . '/profile/' . $profile['nickname']; + } - // don't show connect link to yourself - $connect = $profile['uid'] != local_user() ? L10n::t('Connect') : false; + $follow_link = null; + $unfollow_link = null; + $subscribe_feed_link = null; + $wallmessage_link = null; - // don't show connect link to authenticated visitors either - if (remote_user() && !empty($_SESSION['remote'])) { - foreach ($_SESSION['remote'] as $visitor) { - if ($visitor['uid'] == $profile['uid']) { - $connect = false; - break; + + + $visitor_contact = []; + if ($profile['uid'] && self::getMyURL()) { + $visitor_contact = Contact::selectFirst(['rel'], ['uid' => $profile['uid'], 'nurl' => Strings::normaliseLink(self::getMyURL())]); + } + + $profile_contact = []; + if ($profile['cid'] && self::getMyURL()) { + $profile_contact = Contact::selectFirst(['rel'], ['id' => $profile['cid']]); + } + + $profile_is_dfrn = $profile['network'] == Protocol::DFRN; + $profile_is_native = in_array($profile['network'], Protocol::NATIVE_SUPPORT); + $local_user_is_self = local_user() && local_user() == ($profile['profile_uid'] ?? 0); + $visitor_is_authenticated = (bool)self::getMyURL(); + $visitor_is_following = + in_array($visitor_contact['rel'] ?? 0, [Contact::FOLLOWER, Contact::FRIEND]) + || in_array($profile_contact['rel'] ?? 0, [Contact::SHARING, Contact::FRIEND]); + $visitor_is_followed = + in_array($visitor_contact['rel'] ?? 0, [Contact::SHARING, Contact::FRIEND]) + || in_array($profile_contact['rel'] ?? 0, [Contact::FOLLOWER, Contact::FRIEND]); + $visitor_base_path = self::getMyURL() ? preg_replace('=/profile/(.*)=ism', '', self::getMyURL()) : ''; + + if (!$local_user_is_self) { + if (!$visitor_is_authenticated) { + $follow_link = 'dfrn_request/' . $profile['nickname']; + } elseif ($profile_is_native) { + if ($visitor_is_following) { + $unfollow_link = $visitor_base_path . '/unfollow?url=' . urlencode($profile_url); + } else { + $follow_link = $visitor_base_path .'/follow?url=' . urlencode($profile_url); } } - } - if (!$show_connect) { - $connect = false; - } - - $profile_url = ''; - - // Is the local user already connected to that user? - if ($connect && local_user()) { - if (isset($profile['url'])) { - $profile_url = Strings::normaliseLink($profile['url']); - } else { - $profile_url = Strings::normaliseLink(System::baseUrl() . '/profile/' . $profile['nickname']); + if ($profile_is_dfrn) { + $subscribe_feed_link = 'dfrn_poll/' . $profile['nickname']; } - if (DBA::exists('contact', ['pending' => false, 'uid' => local_user(), 'nurl' => $profile_url])) { - $connect = false; - } - } - - // Is the remote user already connected to that user? - if ($connect && Contact::isFollower(remote_user(), $profile['uid'])) { - $connect = false; - } - - if ($connect && ($profile['network'] != Protocol::DFRN) && !isset($profile['remoteconnect'])) { - $connect = false; - } - - $remoteconnect = null; - if (isset($profile['remoteconnect'])) { - $remoteconnect = $profile['remoteconnect']; - } - - if ($connect && ($profile['network'] == Protocol::DFRN) && !isset($remoteconnect)) { - $subscribe_feed = L10n::t('Atom feed'); - } else { - $subscribe_feed = false; - } - - $wallmessage = false; - $wallmessage_link = false; - - // See issue https://github.com/friendica/friendica/issues/3838 - // Either we remove the message link for remote users or we enable creating messages from remote users - if (remote_user() || (self::getMyURL() && !empty($profile['unkmail']) && ($profile['uid'] != local_user()))) { - $wallmessage = L10n::t('Message'); - - if (remote_user()) { - $r = q( - "SELECT `url` FROM `contact` WHERE `uid` = %d AND `id` = '%s' AND `rel` = %d", - intval($profile['uid']), - intval(remote_user()), - intval(Contact::FRIEND) - ); - } else { - $r = q( - "SELECT `url` FROM `contact` WHERE `uid` = %d AND `nurl` = '%s' AND `rel` = %d", - intval($profile['uid']), - DBA::escape(Strings::normaliseLink(self::getMyURL())), - intval(Contact::FRIEND) - ); - } - if ($r) { - $remote_url = $r[0]['url']; - $message_path = preg_replace('=(.*)/profile/(.*)=ism', '$1/message/new/', $remote_url); - $wallmessage_link = $message_path . base64_encode(defaults($profile, 'addr', '')); - } else if (!empty($profile['nickname'])) { - $wallmessage_link = 'wallmessage/' . $profile['nickname']; + if (Contact::canReceivePrivateMessages($profile)) { + if ($visitor_is_followed || $visitor_is_following) { + $wallmessage_link = $visitor_base_path . '/message/new/' . base64_encode(defaults($profile, 'addr', '')); + } elseif ($visitor_is_authenticated && !empty($profile['unkmail'])) { + $wallmessage_link = 'wallmessage/' . $profile['nickname']; + } } } // show edit profile to yourself - if (!$is_contact && $profile['uid'] == local_user() && Feature::isEnabled(local_user(), 'multi_profiles')) { - $profile['edit'] = [System::baseUrl() . '/profiles', L10n::t('Profiles'), '', L10n::t('Manage/edit profiles')]; - $r = q( - "SELECT * FROM `profile` WHERE `uid` = %d", - local_user() - ); + if (!$is_contact && $local_user_is_self) { + if (Feature::isEnabled(local_user(), 'multi_profiles')) { + $profile['edit'] = [System::baseUrl() . '/profiles', L10n::t('Profiles'), '', L10n::t('Manage/edit profiles')]; + $r = q( + "SELECT * FROM `profile` WHERE `uid` = %d", + local_user() + ); - $profile['menu'] = [ - 'chg_photo' => L10n::t('Change profile photo'), - 'cr_new' => L10n::t('Create New Profile'), - 'entries' => [], - ]; + $profile['menu'] = [ + 'chg_photo' => L10n::t('Change profile photo'), + 'cr_new' => L10n::t('Create New Profile'), + 'entries' => [], + ]; - if (DBA::isResult($r)) { - foreach ($r as $rr) { - $profile['menu']['entries'][] = [ - 'photo' => $rr['thumb'], - 'id' => $rr['id'], - 'alt' => L10n::t('Profile Image'), - 'profile_name' => $rr['profile-name'], - 'isdefault' => $rr['is-default'], - 'visibile_to_everybody' => L10n::t('visible to everybody'), - 'edit_visibility' => L10n::t('Edit visibility'), - ]; + if (DBA::isResult($r)) { + foreach ($r as $rr) { + $profile['menu']['entries'][] = [ + 'photo' => $rr['thumb'], + 'id' => $rr['id'], + 'alt' => L10n::t('Profile Image'), + 'profile_name' => $rr['profile-name'], + 'isdefault' => $rr['is-default'], + 'visibile_to_everybody' => L10n::t('visible to everybody'), + 'edit_visibility' => L10n::t('Edit visibility'), + ]; + } } + } else { + $profile['edit'] = [System::baseUrl() . '/profiles/' . $profile['id'], L10n::t('Edit profile'), '', L10n::t('Edit profile')]; + $profile['menu'] = [ + 'chg_photo' => L10n::t('Change profile photo'), + 'cr_new' => null, + 'entries' => [], + ]; } } - if (!$is_contact && $profile['uid'] == local_user() && !Feature::isEnabled(local_user(), 'multi_profiles')) { - $profile['edit'] = [System::baseUrl() . '/profiles/' . $profile['id'], L10n::t('Edit profile'), '', L10n::t('Edit profile')]; - $profile['menu'] = [ - 'chg_photo' => L10n::t('Change profile photo'), - 'cr_new' => null, - 'entries' => [], - ]; - } // Fetch the account type $account_type = Contact::getAccountType($profile); @@ -523,10 +499,13 @@ class Profile $o .= Renderer::replaceMacros($tpl, [ '$profile' => $p, '$xmpp' => $xmpp, - '$connect' => $connect, - '$remoteconnect' => $remoteconnect, - '$subscribe_feed' => $subscribe_feed, - '$wallmessage' => $wallmessage, + '$follow' => L10n::t('Follow'), + '$follow_link' => $follow_link, + '$unfollow' => L10n::t('Unfollow'), + '$unfollow_link' => $unfollow_link, + '$subscribe_feed' => L10n::t('Atom feed'), + '$subscribe_feed_link' => $subscribe_feed_link, + '$wallmessage' => L10n::t('Message'), '$wallmessage_link' => $wallmessage_link, '$account_type' => $account_type, '$location' => $location, @@ -996,10 +975,7 @@ class Profile */ public static function getMyURL() { - if (!empty($_SESSION['my_url'])) { - return $_SESSION['my_url']; - } - return null; + return Session::get('my_url'); } /** diff --git a/src/Module/Contact.php b/src/Module/Contact.php index 847455f498..989896ef73 100644 --- a/src/Module/Contact.php +++ b/src/Module/Contact.php @@ -944,10 +944,6 @@ class Contact extends BaseModule $profiledata = Model\Contact::getDetailsByURL($contact['url']); - if (local_user() && in_array($profiledata['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::DIASPORA, Protocol::OSTATUS])) { - $profiledata['remoteconnect'] = System::baseUrl() . '/follow?url=' . urlencode($profiledata['url']); - } - Model\Profile::load($a, '', 0, $profiledata, true); $o .= Model\Contact::getPostsFromUrl($contact['url'], true, $update); } diff --git a/view/templates/profile_vcard.tpl b/view/templates/profile_vcard.tpl index 192c860de8..1ee3302669 100644 --- a/view/templates/profile_vcard.tpl +++ b/view/templates/profile_vcard.tpl @@ -50,21 +50,20 @@ {{if $about}}
{{$about}}
{{$profile.about nofilter}}
{{/if}} {{include file="diaspora_vcard.tpl"}} - + diff --git a/view/theme/duepuntozero/templates/profile_vcard.tpl b/view/theme/duepuntozero/templates/profile_vcard.tpl index d80b8feed2..3c933c8333 100644 --- a/view/theme/duepuntozero/templates/profile_vcard.tpl +++ b/view/theme/duepuntozero/templates/profile_vcard.tpl @@ -36,21 +36,20 @@ {{include file="diaspora_vcard.tpl"}} -
+
diff --git a/view/theme/frio/templates/profile_vcard.tpl b/view/theme/frio/templates/profile_vcard.tpl index b00e823217..d256a17dad 100644 --- a/view/theme/frio/templates/profile_vcard.tpl +++ b/view/theme/frio/templates/profile_vcard.tpl @@ -46,23 +46,24 @@ {{if $account_type}}{{/if}} + {{if $follow_link || $unfollow_link || $wallmessage_link}} + {{/if}}
diff --git a/view/theme/quattro/templates/profile_vcard.tpl b/view/theme/quattro/templates/profile_vcard.tpl index 927047cd33..cd8bd6ee7c 100644 --- a/view/theme/quattro/templates/profile_vcard.tpl +++ b/view/theme/quattro/templates/profile_vcard.tpl @@ -69,21 +69,20 @@ {{/if}} {{include file="diaspora_vcard.tpl"}} - + diff --git a/view/theme/vier/templates/profile_vcard.tpl b/view/theme/vier/templates/profile_vcard.tpl index 70bc13e82b..6331e84c4e 100644 --- a/view/theme/vier/templates/profile_vcard.tpl +++ b/view/theme/vier/templates/profile_vcard.tpl @@ -61,21 +61,20 @@ {{if $about}}
{{$about}}
{{$profile.about nofilter}}
{{/if}} {{include file="diaspora_vcard.tpl"}} - + From b00bcbb1c150246731822f0e22c1ba80000ff027 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 10 Jun 2019 21:40:44 -0400 Subject: [PATCH 5/6] Normalize the contact sidebar with the profile sidebar - Remove un/follow text links in contact status window --- src/Module/Contact.php | 38 +++++++++++++--------- view/templates/contact_edit.tpl | 5 --- view/templates/widget/vcard.tpl | 15 +++++++++ view/theme/frio/templates/contact_edit.tpl | 5 --- view/theme/frio/templates/widget/vcard.tpl | 25 ++++++++++++++ view/theme/vier/templates/contact_edit.tpl | 5 --- 6 files changed, 62 insertions(+), 31 deletions(-) diff --git a/src/Module/Contact.php b/src/Module/Contact.php index 989896ef73..feae601fdd 100644 --- a/src/Module/Contact.php +++ b/src/Module/Contact.php @@ -309,6 +309,21 @@ class Contact extends BaseModule $network_link = ''; } + $follow_link = ''; + $unfollow_link = ''; + if (in_array($contact['network'], Protocol::NATIVE_SUPPORT)) { + if ($contact['uid'] && in_array($contact['rel'], [Model\Contact::SHARING, Model\Contact::FRIEND])) { + $unfollow_link = 'unfollow?url=' . urlencode($contact['url']); + } elseif(!$contact['pending']) { + $follow_link = 'follow?url=' . urlencode($contact['url']); + } + } + + $wallmessage_link = ''; + if ($contact['uid'] && Model\Contact::canReceivePrivateMessages($contact)) { + $wallmessage_link = 'message/new/' . $contact['id']; + } + $vcard_widget = Renderer::replaceMacros(Renderer::getMarkupTemplate('widget/vcard.tpl'), [ '$name' => $contact['name'], '$photo' => $contact['photo'], @@ -316,7 +331,13 @@ class Contact extends BaseModule '$addr' => defaults($contact, 'addr', ''), '$network_link' => $network_link, '$network' => L10n::t('Network:'), - '$account_type' => Model\Contact::getAccountType($contact) + '$account_type' => Model\Contact::getAccountType($contact), + '$follow' => L10n::t('Follow'), + '$follow_link' => $follow_link, + '$unfollow' => L10n::t('Unfollow'), + '$unfollow_link' => $unfollow_link, + '$wallmessage' => L10n::t('Message'), + '$wallmessage_link' => $wallmessage_link, ]); $findpeople_widget = ''; @@ -557,19 +578,6 @@ class Contact extends BaseModule $profile_select = ContactSelector::profileAssign($contact['profile-id'], $contact['network'] !== Protocol::DFRN); } - /// @todo Only show the following link with DFRN when the remote version supports it - $follow = ''; - $follow_text = ''; - if ($contact['uid'] && in_array($contact['rel'], [Model\Contact::FRIEND, Model\Contact::SHARING])) { - if (in_array($contact['network'], Protocol::NATIVE_SUPPORT)) { - $follow = $a->getBaseURL(true) . '/unfollow?url=' . urlencode($contact['url']); - $follow_text = L10n::t('Disconnect/Unfollow'); - } - } elseif(!$contact['pending']) { - $follow = $a->getBaseURL(true) . '/follow?url=' . urlencode($contact['url']); - $follow_text = L10n::t('Connect/Follow'); - } - // Load contactact related actions like hide, suggest, delete and others $contact_actions = self::getContactActions($contact); @@ -610,8 +618,6 @@ class Contact extends BaseModule '$updpub' => L10n::t('Update public posts'), '$last_update' => $last_update, '$udnow' => L10n::t('Update now'), - '$follow' => $follow, - '$follow_text' => $follow_text, '$profile_select' => $profile_select, '$contact_id' => $contact['id'], '$block_text' => ($contact['blocked'] ? L10n::t('Unblock') : L10n::t('Block')), diff --git a/view/templates/contact_edit.tpl b/view/templates/contact_edit.tpl index 644121cadd..d78d4162ef 100644 --- a/view/templates/contact_edit.tpl +++ b/view/templates/contact_edit.tpl @@ -44,11 +44,6 @@ {{if $ignored}}
  • {{$ignored}}
  • {{/if}} {{if $archived}}
  • {{$archived}}
  • {{/if}} - - {{* End of contact-edit-status-wrapper *}} {{* Some information about the contact from the profile *}} diff --git a/view/templates/widget/vcard.tpl b/view/templates/widget/vcard.tpl index 240466460e..465d206b81 100644 --- a/view/templates/widget/vcard.tpl +++ b/view/templates/widget/vcard.tpl @@ -10,5 +10,20 @@ {{/if}} {{if $account_type}}{{/if}} {{if $network_link}}
    {{$network}}
    {{$network_link nofilter}}
    {{/if}} + + +
    diff --git a/view/theme/frio/templates/contact_edit.tpl b/view/theme/frio/templates/contact_edit.tpl index 92ff615a98..f9454dc654 100644 --- a/view/theme/frio/templates/contact_edit.tpl +++ b/view/theme/frio/templates/contact_edit.tpl @@ -58,11 +58,6 @@ {{if $ignored}}
  • {{$ignored}}
  • {{/if}} {{if $archived}}
  • {{$archived}}
  • {{/if}} - - {{* End of contact-edit-status-wrapper *}} diff --git a/view/theme/frio/templates/widget/vcard.tpl b/view/theme/frio/templates/widget/vcard.tpl index d1b41728b1..366c570a74 100644 --- a/view/theme/frio/templates/widget/vcard.tpl +++ b/view/theme/frio/templates/widget/vcard.tpl @@ -34,5 +34,30 @@ {{if $network_link}}
    {{$network}}
    {{$network_link nofilter}}
    {{/if}} + + diff --git a/view/theme/vier/templates/contact_edit.tpl b/view/theme/vier/templates/contact_edit.tpl index a01fac9ee4..bd07f18213 100644 --- a/view/theme/vier/templates/contact_edit.tpl +++ b/view/theme/vier/templates/contact_edit.tpl @@ -45,11 +45,6 @@ {{if $ignored}}
  • {{$ignored}}
  • {{/if}} {{if $archived}}
  • {{$archived}}
  • {{/if}} - - {{* End of contact-edit-status-wrapper *}} {{* Some information about the contact from the profile *}} From 304c144bc2e5e3401489425dc7e73a5fefb73008 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 12 Jun 2019 10:56:41 -0400 Subject: [PATCH 6/6] Use App::getBaseURL instead of System::getBaseURL in Model\Profile::load Co-Authored-By: Philipp --- src/Model/Profile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Profile.php b/src/Model/Profile.php index 4cda6e452a..f78edb5bd0 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -306,7 +306,7 @@ class Profile if (isset($profile['url'])) { $profile_url = $profile['url']; } else { - $profile_url = System::baseUrl() . '/profile/' . $profile['nickname']; + $profile_url = $a->getBaseURL() . '/profile/' . $profile['nickname']; } $follow_link = null;