aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-06-09 16:26:30 -0700
committerzotlabs <mike@macgirvin.com>2017-06-09 16:26:30 -0700
commit2a4032d71aaa8934ce948f549e55e53d14cdfc93 (patch)
treecad98e5981a60c8ee60c490ee42268ba3f793bc3
parent42c9f853a7d878fef7f545b58a744c134baabc02 (diff)
downloadvolse-hubzilla-2a4032d71aaa8934ce948f549e55e53d14cdfc93.tar.gz
volse-hubzilla-2a4032d71aaa8934ce948f549e55e53d14cdfc93.tar.bz2
volse-hubzilla-2a4032d71aaa8934ce948f549e55e53d14cdfc93.zip
clean up the warnings about connections on unclonable networks
-rw-r--r--Zotlabs/Module/Connedit.php18
-rwxr-xr-xview/tpl/abook_edit.tpl5
2 files changed, 20 insertions, 3 deletions
diff --git a/Zotlabs/Module/Connedit.php b/Zotlabs/Module/Connedit.php
index a42987fcf..d301c2d45 100644
--- a/Zotlabs/Module/Connedit.php
+++ b/Zotlabs/Module/Connedit.php
@@ -842,6 +842,22 @@ class Connedit extends \Zotlabs\Web\Controller {
}
else
$locstr = t('none');
+
+ $clone_warn = '';
+ $clonable = (in_array($contact['xchan_network'],['zot','rss']) ? true : false);
+ if(! $clonable) {
+ $clone_warn = '<strong>';
+ $clone_warn .= ((intval($contact['abook_not_here']))
+ ? t('This connection is unreachable from this location.')
+ : t('This connection may be unreachable from other channel locations.')
+ );
+ $clone_warn .= '</strong><br>' . t('Location independence is not supported by their network.');
+ }
+
+
+
+ if(intval($contact['abook_not_here']) && $unclonable)
+ $not_here = t('This connection is unreachable from this location. Location independence is not supported by their network.');
$o .= replace_macros($tpl, [
'$header' => (($self) ? t('Connection Default Permissions') : sprintf( t('Connection: %s'),$contact['xchan_name'])),
@@ -856,7 +872,7 @@ class Connedit extends \Zotlabs\Web\Controller {
'$addr_text' => t('This connection\'s primary address is'),
'$loc_text' => t('Available locations:'),
'$locstr' => $locstr,
- '$not_here' => ((intval($contact['abook_not_here'])) ? t('Not connected at this location') : ''),
+ '$unclonable' => $clone_warn,
'$notself' => (($self) ? '' : '1'),
'$self' => (($self) ? '1' : ''),
'$autolbl' => t('The permissions indicated on this page will be applied to all new connections.'),
diff --git a/view/tpl/abook_edit.tpl b/view/tpl/abook_edit.tpl
index 8d44e8b16..146030494 100755
--- a/view/tpl/abook_edit.tpl
+++ b/view/tpl/abook_edit.tpl
@@ -59,10 +59,11 @@
{{$loc_text}} {{$locstr}}
</div>
{{/if}}
- {{if $not_here}}
+ {{if $unclonable}}
<div>
- <strong>{{$not_here}}</strong>
+ <br>{{$unclonable}}
</div>
+ <br>
{{/if}}
{{if $last_update}}
<div>