don't show connections with removed xchans - as there isn't much to see

This commit is contained in:
friendica 2013-08-04 05:12:11 -07:00
parent 6e23865533
commit 1b7b53f409
2 changed files with 30 additions and 31 deletions

View File

@ -624,26 +624,24 @@ function connections_content(&$a) {
if(count($r)) { if(count($r)) {
foreach($r as $rr) { foreach($r as $rr) {
if($rr['xchan_url']) {
$contacts[] = array( $contacts[] = array(
'img_hover' => sprintf( t('%1$s [%2$s]'),$rr['xchan_name'],$rr['xchan_url']), 'img_hover' => sprintf( t('%1$s [%2$s]'),$rr['xchan_name'],$rr['xchan_url']),
'edit_hover' => t('Edit contact'), 'edit_hover' => t('Edit contact'),
'photo_menu' => contact_photo_menu($rr), 'photo_menu' => contact_photo_menu($rr),
'id' => $rr['abook_id'], 'id' => $rr['abook_id'],
'alt_text' => $alt_text, 'alt_text' => $alt_text,
'dir_icon' => $dir_icon, 'dir_icon' => $dir_icon,
'thumb' => $rr['xchan_photo_m'], 'thumb' => $rr['xchan_photo_m'],
'name' => $rr['xchan_name'], 'name' => $rr['xchan_name'],
'username' => $rr['xchan_name'], 'username' => $rr['xchan_name'],
'sparkle' => $sparkle, 'sparkle' => $sparkle,
'link' => z_root() . '/connections/' . $rr['abook_id'], 'link' => z_root() . '/connections/' . $rr['abook_id'],
'url' => $rr['xchan_url'], 'url' => $rr['xchan_url'],
'network' => network_to_name($rr['network']), 'network' => network_to_name($rr['network']),
); );
}
} }
} }

View File

@ -63,18 +63,19 @@ function viewconnections_content(&$a) {
foreach($r as $rr) { foreach($r as $rr) {
$url = zid($rr['xchan_url']); $url = zid($rr['xchan_url']);
if($url) {
$contacts[] = array( $contacts[] = array(
'id' => $rr['abook_id'], 'id' => $rr['abook_id'],
'img_hover' => sprintf( t('Visit %s\'s profile [%s]'), $rr['xchan_name'], $rr['xchan_url']), 'img_hover' => sprintf( t('Visit %s\'s profile [%s]'), $rr['xchan_name'], $rr['xchan_url']),
'thumb' => $rr['xchan_photo_m'], 'thumb' => $rr['xchan_photo_m'],
'name' => substr($rr['xchan_name'],0,20), 'name' => substr($rr['xchan_name'],0,20),
'username' => $rr['xchan_addr'], 'username' => $rr['xchan_addr'],
'link' => $url, 'link' => $url,
'sparkle' => '', 'sparkle' => '',
'itemurl' => $rr['url'], 'itemurl' => $rr['url'],
'network' => '', 'network' => '',
); );
}
} }