aboutsummaryrefslogtreecommitdiffstats
path: root/mod/connections.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/connections.php')
-rw-r--r--mod/connections.php38
1 files changed, 32 insertions, 6 deletions
diff --git a/mod/connections.php b/mod/connections.php
index 915d14b77..f43dec73e 100644
--- a/mod/connections.php
+++ b/mod/connections.php
@@ -228,23 +228,49 @@ function connections_content(&$a) {
foreach($r as $rr) {
if($rr['xchan_url']) {
+
+ $status_str = '';
+ $status = array(
+ ((intval($rr['abook_pending'])) ? t('Pending approval') : ''),
+ ((intval($rr['abook_archived'])) ? t('Archived') : ''),
+ ((intval($rr['abook_hidden'])) ? t('Hidden') : ''),
+ ((intval($rr['abook_ignored'])) ? t('Ignored') : ''),
+ ((intval($rr['abook_blocked'])) ? t('Blocked') : '')
+ );
+
+ foreach($status as $str) {
+ if(!$str)
+ continue;
+ $status_str .= $str;
+ $status_str .= ', ';
+ }
+ $status_str = rtrim($status_str, ', ');
+
$contacts[] = array(
'img_hover' => sprintf( t('%1$s [%2$s]'),$rr['xchan_name'],$rr['xchan_url']),
'edit_hover' => t('Edit connection'),
'delete_hover' => t('Delete connection'),
'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'],
'classes' => (intval($rr['abook_archived']) ? 'archived' : ''),
'link' => z_root() . '/connedit/' . $rr['abook_id'],
- 'deletelink' => z_root() . '/connedit/' . $rr['abook_id'] . '/drop',
- 'edit' => t('Edit'),
+ 'deletelink' => z_root() . '/connedit/' . intval($rr['abook_id']) . '/drop',
'delete' => t('Delete'),
'url' => chanlink_url($rr['xchan_url']),
- 'network' => network_to_name($rr['network']),
+ 'webbie_label' => t('Channel address'),
+ 'webbie' => $rr['xchan_addr'],
+ 'network_label' => t('Network'),
+ 'network' => network_to_name($rr['xchan_network']),
+ 'public_forum' => ((intval($rr['xchan_pubforum'])) ? true : false),
+ 'status_label' => t('Status'),
+ 'status' => $status_str,
+ 'connected_label' => t('Connected'),
+ 'connected' => datetime_convert('UTC',date_default_timezone_get(),$rr['abook_created'], 'c'),
+ 'approve_hover' => t('Approve connection'),
+ 'approve' => (($rr['abook_pending']) ? t('Approve') : false),
+ 'recent_label' => t('Recent activity'),
+ 'recentlink' => z_root() . '/network/?f=&cid=' . intval($rr['abook_id'])
);
}
}