aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod/connections.php36
-rw-r--r--mod/viewconnections.php25
2 files changed, 30 insertions, 31 deletions
diff --git a/mod/connections.php b/mod/connections.php
index 9321676c5..2ad9342b8 100644
--- a/mod/connections.php
+++ b/mod/connections.php
@@ -624,26 +624,24 @@ function connections_content(&$a) {
if(count($r)) {
foreach($r as $rr) {
-
- $contacts[] = array(
- 'img_hover' => sprintf( t('%1$s [%2$s]'),$rr['xchan_name'],$rr['xchan_url']),
- 'edit_hover' => t('Edit contact'),
- 'photo_menu' => contact_photo_menu($rr),
- 'id' => $rr['abook_id'],
- 'alt_text' => $alt_text,
- 'dir_icon' => $dir_icon,
- 'thumb' => $rr['xchan_photo_m'],
- 'name' => $rr['xchan_name'],
- 'username' => $rr['xchan_name'],
- 'sparkle' => $sparkle,
- 'link' => z_root() . '/connections/' . $rr['abook_id'],
- 'url' => $rr['xchan_url'],
- 'network' => network_to_name($rr['network']),
- );
+ if($rr['xchan_url']) {
+ $contacts[] = array(
+ 'img_hover' => sprintf( t('%1$s [%2$s]'),$rr['xchan_name'],$rr['xchan_url']),
+ 'edit_hover' => t('Edit contact'),
+ 'photo_menu' => contact_photo_menu($rr),
+ 'id' => $rr['abook_id'],
+ 'alt_text' => $alt_text,
+ 'dir_icon' => $dir_icon,
+ 'thumb' => $rr['xchan_photo_m'],
+ 'name' => $rr['xchan_name'],
+ 'username' => $rr['xchan_name'],
+ 'sparkle' => $sparkle,
+ 'link' => z_root() . '/connections/' . $rr['abook_id'],
+ 'url' => $rr['xchan_url'],
+ 'network' => network_to_name($rr['network']),
+ );
+ }
}
-
-
-
}
diff --git a/mod/viewconnections.php b/mod/viewconnections.php
index a08723ba2..9c85d63b6 100644
--- a/mod/viewconnections.php
+++ b/mod/viewconnections.php
@@ -63,18 +63,19 @@ function viewconnections_content(&$a) {
foreach($r as $rr) {
$url = zid($rr['xchan_url']);
-
- $contacts[] = array(
- 'id' => $rr['abook_id'],
- 'img_hover' => sprintf( t('Visit %s\'s profile [%s]'), $rr['xchan_name'], $rr['xchan_url']),
- 'thumb' => $rr['xchan_photo_m'],
- 'name' => substr($rr['xchan_name'],0,20),
- 'username' => $rr['xchan_addr'],
- 'link' => $url,
- 'sparkle' => '',
- 'itemurl' => $rr['url'],
- 'network' => '',
- );
+ if($url) {
+ $contacts[] = array(
+ 'id' => $rr['abook_id'],
+ 'img_hover' => sprintf( t('Visit %s\'s profile [%s]'), $rr['xchan_name'], $rr['xchan_url']),
+ 'thumb' => $rr['xchan_photo_m'],
+ 'name' => substr($rr['xchan_name'],0,20),
+ 'username' => $rr['xchan_addr'],
+ 'link' => $url,
+ 'sparkle' => '',
+ 'itemurl' => $rr['url'],
+ 'network' => '',
+ );
+ }
}