]> git.mxchange.org Git - friendica.git/blobdiff - mod/contacts.php
Merge pull request #4933 from annando/bugfix-distribute
[friendica.git] / mod / contacts.php
index d77192e02426c73cc26db567fdbecafa4211e607..cd9021c17ec2cd4edde1b6c9b1997f92bb840f89 100644 (file)
@@ -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'),