X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fcontacts.php;h=cd9021c17ec2cd4edde1b6c9b1997f92bb840f89;hb=6e7c6ab0fa46dc3ab2f35326bc1b2c747377d509;hp=09090e541a502e5254c726f2ca070421051d1b72;hpb=0c52866693add20fc4476e26a5c7ae14f5d5272a;p=friendica.git diff --git a/mod/contacts.php b/mod/contacts.php index 09090e541a..cd9021c17e 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -45,6 +45,14 @@ function contacts_init(App $a) } if (DBM::is_result($contact)) { + if ($contact['self']) { + if (($a->argc == 3) && intval($a->argv[1]) && ($a->argv[2] == "posts")) { + goaway('profile/' . $contact['nick']); + } else { + goaway('profile/' . $contact['nick'] . '?tab=profile'); + } + } + $a->data['contact'] = $contact; if (($a->data['contact']['network'] != "") && ($a->data['contact']['network'] != NETWORK_DFRN)) { @@ -579,9 +587,10 @@ function contacts_content(App $a) $profile_select = ContactSelector::profileAssign($contact['profile-id'], (($contact['network'] !== NETWORK_DFRN) ? true : false)); } + /// @todo Only show the following link with DFRN when the remote version supports it $follow = ''; $follow_text = ''; - if (in_array($contact['network'], [NETWORK_DIASPORA, NETWORK_OSTATUS])) { + if (in_array($contact['network'], [NETWORK_DIASPORA, NETWORK_OSTATUS, NETWORK_DFRN])) { if ($contact['rel'] == CONTACT_IS_FOLLOWER) { $follow = System::baseUrl(true) . "/follow?url=" . urlencode($contact["url"]); $follow_text = L10n::t("Connect/Follow"); @@ -939,6 +948,13 @@ function _contact_detail_for_template($rr) $sparkle = ''; } + if ($rr['self']) { + $dir_icon = 'images/larrow.gif'; + $alt_text = L10n::t('This is you'); + $url = $rr['url']; + $sparkle = ''; + } + return [ 'img_hover' => L10n::t('Visit %s\'s profile [%s]', $rr['name'], $rr['url']), 'edit_hover' => L10n::t('Edit contact'),