X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fcontacts.php;h=cd9021c17ec2cd4edde1b6c9b1997f92bb840f89;hb=6e7c6ab0fa46dc3ab2f35326bc1b2c747377d509;hp=d77192e02426c73cc26db567fdbecafa4211e607;hpb=3ca2dc70b3990380a9e6181c08c09491466e0790;p=friendica.git diff --git a/mod/contacts.php b/mod/contacts.php index d77192e024..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)) { @@ -940,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'),