]> git.mxchange.org Git - friendica.git/blobdiff - mod/contacts.php
Merge pull request #2092 from strk/do-not-notify-own-items
[friendica.git] / mod / contacts.php
index 3ace8709049f1f393eb67a464f27aa610c7ad38d..017b1d6435fd8456953d3fadcc312312fdc0b6e7 100644 (file)
@@ -40,6 +40,7 @@ function contacts_init(&$a) {
                                '$photo' => $a->data['contact']['photo'],
                                '$url' => ($a->data['contact']['network'] == NETWORK_DFRN) ? $a->get_baseurl()."/redir/".$a->data['contact']['id'] : $a->data['contact']['url']
                        ));
+                       $finpeople_widget = '';
                        $follow_widget = '';
                        $networks_widget = '';
        }
@@ -50,9 +51,10 @@ function contacts_init(&$a) {
                        $follow_widget = follow_widget($_GET['add']);
                else
                        $follow_widget = follow_widget();
+
+               $findpeople_widget .= findpeople_widget();
        }
 
-       $findpeople_widget .= findpeople_widget();
        $groups_widget .= group_side('contacts','group',false,0,$contact_id);
        
        $a->page['aside'] .= replace_macros(get_markup_template("contacts-widget-sidebar.tpl"),array(
@@ -552,6 +554,7 @@ function contacts_content(&$a) {
                                'url'   => $a->get_baseurl(true) . '/contacts/' . $contact_id . '/block',
                                'sel'   => '',
                                'title' => t('Toggle Blocked status'),
+                               'id'    => 'toggle-block-tab',
                                'accesskey' => 'b',
                        ),
                        array(
@@ -559,6 +562,7 @@ function contacts_content(&$a) {
                                'url'   => $a->get_baseurl(true) . '/contacts/' . $contact_id . '/ignore',
                                'sel'   => '',
                                'title' => t('Toggle Ignored status'),
+                               'id'    => 'toggle-ignore-tab',
                                'accesskey' => 'i',
                        ),
 
@@ -567,6 +571,7 @@ function contacts_content(&$a) {
                                'url'   => $a->get_baseurl(true) . '/contacts/' . $contact_id . '/archive',
                                'sel'   => '',
                                'title' => t('Toggle Archive status'),
+                               'id'    => 'toggle-archive-tab',
                                'accesskey' => 'v',
                        ),
                        array(
@@ -574,6 +579,7 @@ function contacts_content(&$a) {
                                'url'   => $a->get_baseurl(true) . '/crepair/' . $contact_id,
                                'sel'   => '',
                                'title' => t('Advanced Contact Settings'),
+                               'id'    => 'repair-tab',
                                'accesskey' => 'r',
                        )
                );
@@ -695,6 +701,7 @@ function contacts_content(&$a) {
                        'url'   => $a->get_baseurl(true) . '/suggest',
                        'sel'   => '',
                        'title' => t('Suggest potential friends'),
+                       'id'    => 'suggestions-tab',
                        'accesskey' => 'g',
                ),
                array(
@@ -702,6 +709,7 @@ function contacts_content(&$a) {
                        'url'   => $a->get_baseurl(true) . '/contacts/all',
                        'sel'   => ($all) ? 'active' : '',
                        'title' => t('Show all contacts'),
+                       'id'    => 'showall-tab',
                        'accesskey' => 'l',
                ),
                array(
@@ -709,6 +717,7 @@ function contacts_content(&$a) {
                        'url'   => $a->get_baseurl(true) . '/contacts',
                        'sel'   => ((! $all) && (! $blocked) && (! $hidden) && (! $search) && (! $nets) && (! $ignored) && (! $archived)) ? 'active' : '',
                        'title' => t('Only show unblocked contacts'),
+                       'id'    => 'showunblocked-tab',
                        'accesskey' => 'o',
                ),
 
@@ -717,6 +726,7 @@ function contacts_content(&$a) {
                        'url'   => $a->get_baseurl(true) . '/contacts/blocked',
                        'sel'   => ($blocked) ? 'active' : '',
                        'title' => t('Only show blocked contacts'),
+                       'id'    => 'showblocked-tab',
                        'accesskey' => 'b',
                ),
 
@@ -725,6 +735,7 @@ function contacts_content(&$a) {
                        'url'   => $a->get_baseurl(true) . '/contacts/ignored',
                        'sel'   => ($ignored) ? 'active' : '',
                        'title' => t('Only show ignored contacts'),
+                       'id'    => 'showignored-tab',
                        'accesskey' => 'i',
                ),
 
@@ -733,6 +744,7 @@ function contacts_content(&$a) {
                        'url'   => $a->get_baseurl(true) . '/contacts/archived',
                        'sel'   => ($archived) ? 'active' : '',
                        'title' => t('Only show archived contacts'),
+                       'id'    => 'showarchived-tab',
                        'accesskey' => 'y',
                ),
 
@@ -741,6 +753,7 @@ function contacts_content(&$a) {
                        'url'   => $a->get_baseurl(true) . '/contacts/hidden',
                        'sel'   => ($hidden) ? 'active' : '',
                        'title' => t('Only show hidden contacts'),
+                       'id'    => 'showhidden-tab',
                        'accesskey' => 'h',
                ),
 
@@ -854,7 +867,7 @@ function _contact_detail_for_template($rr){
                'name' => htmlentities($rr['name']),
                'username' => htmlentities($rr['name']),
                'sparkle' => $sparkle,
-               'itemurl' => $rr['url'],
+               'itemurl' => (($rr['addr'] != "") ? $rr['addr'] : $rr['url']),
                'url' => $url,
                'network' => network_to_name($rr['network'], $rr['url']),
        );