From f3ec818a66e7909bcb744868cfef43c3481c4e43 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 20 Dec 2016 20:37:06 -0800 Subject: abook_vcard cleanup --- Zotlabs/Module/Connections.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Module/Connections.php') diff --git a/Zotlabs/Module/Connections.php b/Zotlabs/Module/Connections.php index a412d16ae..a0375cebb 100644 --- a/Zotlabs/Module/Connections.php +++ b/Zotlabs/Module/Connections.php @@ -228,7 +228,7 @@ class Connections extends \Zotlabs\Web\Controller { $contacts = array(); - if(count($r)) { + if($r) { foreach($r as $rr) { if($rr['xchan_url']) { -- cgit v1.2.3 From 3d811a17feb9b3d0fd4dc09023e3b7b5fe1623ac Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 20 Dec 2016 23:26:31 -0800 Subject: provide call button on connections list if mobile|tablet and a phone number exists --- Zotlabs/Module/Connections.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Module/Connections.php') diff --git a/Zotlabs/Module/Connections.php b/Zotlabs/Module/Connections.php index a0375cebb..950be660d 100644 --- a/Zotlabs/Module/Connections.php +++ b/Zotlabs/Module/Connections.php @@ -229,9 +229,17 @@ class Connections extends \Zotlabs\Web\Controller { $contacts = array(); if($r) { - + + vcard_query($r); + + foreach($r as $rr) { if($rr['xchan_url']) { + + if(($rr['vcard']) && is_array($rr['vcard']['tels']) && $rr['vcard']['tels'][0]['nr']) + $phone = ((\App::$is_mobile || \App::$is_tablet) ? $rr['vcard']['tels'][0]['nr'] : ''); + else + $phone = ''; $status_str = ''; $status = array( @@ -267,6 +275,8 @@ class Connections extends \Zotlabs\Web\Controller { 'network_label' => t('Network'), 'network' => network_to_name($rr['xchan_network']), 'public_forum' => ((intval($rr['xchan_pubforum'])) ? true : false), + 'call' => t('Call'), + 'phone' => $phone, 'status_label' => t('Status'), 'status' => $status_str, 'connected_label' => t('Connected'), -- cgit v1.2.3 From 41c67fa345aeddc7f44378e37c4534701540b691 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 23 Feb 2017 10:36:00 +0100 Subject: more places to use chanlink_hash() instead of chanlink_url() for profile_link --- Zotlabs/Module/Connections.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Module/Connections.php') diff --git a/Zotlabs/Module/Connections.php b/Zotlabs/Module/Connections.php index 950be660d..e8a92e8b7 100644 --- a/Zotlabs/Module/Connections.php +++ b/Zotlabs/Module/Connections.php @@ -269,7 +269,7 @@ class Connections extends \Zotlabs\Web\Controller { 'link' => z_root() . '/connedit/' . $rr['abook_id'], 'deletelink' => z_root() . '/connedit/' . intval($rr['abook_id']) . '/drop', 'delete' => t('Delete'), - 'url' => chanlink_url($rr['xchan_url']), + 'url' => chanlink_hash($rr['xchan_hash']), 'webbie_label' => t('Channel address'), 'webbie' => $rr['xchan_addr'], 'network_label' => t('Network'), -- cgit v1.2.3