diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-10-29 01:23:56 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-10-29 01:23:56 -0700 |
commit | 96402a235482af73c9c958ad9b1cf629d0bfb8cb (patch) | |
tree | ceb22fd24e8abeb8026d84eeb1a94b7c4c4188ed | |
parent | 4fec7aa991e0afe63a47722a7186e6fd2058d20a (diff) | |
download | volse-hubzilla-96402a235482af73c9c958ad9b1cf629d0bfb8cb.tar.gz volse-hubzilla-96402a235482af73c9c958ad9b1cf629d0bfb8cb.tar.bz2 volse-hubzilla-96402a235482af73c9c958ad9b1cf629d0bfb8cb.zip |
This may take a few iterations to discover the best way to present the information, but we need a way for members to know what alternate locations are available for a channel during times of server issues - and as recently discovered if there aren't any hublocs at all; without digging around the database and probing channels and other messy stuff.
-rw-r--r-- | mod/connedit.php | 18 | ||||
-rw-r--r-- | version.inc | 2 | ||||
-rwxr-xr-x | view/tpl/abook_edit.tpl | 7 |
3 files changed, 24 insertions, 3 deletions
diff --git a/mod/connedit.php b/mod/connedit.php index fd3abdcf0..d2b86ff86 100644 --- a/mod/connedit.php +++ b/mod/connedit.php @@ -652,12 +652,28 @@ function connedit_content(&$a) { $perms[] = array('perms_' . $k, $v[3], (($contact['abook_their_perms'] & $v[1]) ? "1" : ""),$thisperm, $v[1], (($channel[$v[0]] == PERMS_SPECIFIC) ? '' : '1'), $v[4], $checkinherited); } + $locstr = ''; + + $locs = q("select hubloc_addr as location from hubloc where hubloc_hash = '%s'", + dbesc($contact['xchan_hash']) + ); + + if($locs) { + foreach($locs as $l) { + if(strlen($locstr)) + $locstr .= ', '; + $locstr .= $l['location']; + } + } + $o .= replace_macros($tpl,array( '$header' => (($self) ? t('Connection Default Permissions') : sprintf( t('Connection: %s'),$contact['xchan_name'])), '$autoperms' => array('autoperms',t('Apply these permissions automatically'), ((get_pconfig(local_channel(),'system','autoperms')) ? 1 : 0), 'Connection requests will be approved without your interaction', array(t('No'),('Yes'))), '$addr' => $contact['xchan_addr'], - '$addr_text' => t('This connection\'s address is'), + '$addr_text' => t('This connection\'s primary address is'), + '$loc_text' => t('Available locations:'), + '$locstr' => $locstr, '$notself' => (($self) ? '' : '1'), '$self' => (($self) ? '1' : ''), '$autolbl' => t('The permissions indicated on this page will be applied to all new connections.'), diff --git a/version.inc b/version.inc index 8f0263b11..89cc96160 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2015-10-28.1199 +2015-10-29.1200 diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl index 0a7cf2d4d..1ed3baafa 100755 --- a/view/tpl/abook_edit.tpl +++ b/view/tpl/abook_edit.tpl @@ -33,8 +33,13 @@ {{/foreach}} <div class="section-content-info-wrapper"> <div> - {{$addr_text}} <strong>'{{$addr}}'</strong> + {{$addr_text}} <strong>'{{$addr}}'</strong> </div> + {{if $locstr}} + <div> + {{$loc_text}} {{$locstr}} + </div> + {{/if}} {{if $last_update}} <div> {{$lastupdtext}} {{$last_update}} |