aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-01-14 23:23:12 +0100
committerMario Vavti <mario@mariovavti.com>2016-01-14 23:23:12 +0100
commit588d022fbb8490f0531b7e44a6af0b596409dc38 (patch)
tree0c6971f5c8b41b7e2898297cdbaa4a228486b5e1 /mod
parent9f9fdc1434b7283171f8d843f225228cdb322115 (diff)
downloadvolse-hubzilla-588d022fbb8490f0531b7e44a6af0b596409dc38.tar.gz
volse-hubzilla-588d022fbb8490f0531b7e44a6af0b596409dc38.tar.bz2
volse-hubzilla-588d022fbb8490f0531b7e44a6af0b596409dc38.zip
provide some info about our contacts - status (archived, hidden, etc.), public forum (like in directory) and show since when we are connected
Diffstat (limited to 'mod')
-rw-r--r--mod/connections.php25
1 files changed, 24 insertions, 1 deletions
diff --git a/mod/connections.php b/mod/connections.php
index 915d14b77..1635dcee0 100644
--- a/mod/connections.php
+++ b/mod/connections.php
@@ -228,6 +228,24 @@ function connections_content(&$a) {
foreach($r as $rr) {
if($rr['xchan_url']) {
+
+ $status_str = '';
+ $status = array(
+ ((intval($rr['abook_pending'])) ? t('Pending') : ''),
+ ((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'),
@@ -244,7 +262,12 @@ function connections_content(&$a) {
'edit' => t('Edit'),
'delete' => t('Delete'),
'url' => chanlink_url($rr['xchan_url']),
- 'network' => network_to_name($rr['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')
);
}
}