aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Directory.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2018-01-09 09:00:20 +0100
committerMario <mario@mariovavti.com>2018-01-09 09:00:20 +0100
commit4f4d0e416eac87121898b8a27b1afa6065ff17a2 (patch)
treeaae7f2582b2b9c6596dcbf87c06a836434140830 /Zotlabs/Module/Directory.php
parent22c89b6c660e185d5c5c6362acf23b145d932d15 (diff)
parent8fde0f01b8472082158b38386046ed606bcfbc49 (diff)
downloadvolse-hubzilla-3.0.tar.gz
volse-hubzilla-3.0.tar.bz2
volse-hubzilla-3.0.zip
Merge branch '3.0RC'3.0
Diffstat (limited to 'Zotlabs/Module/Directory.php')
-rw-r--r--Zotlabs/Module/Directory.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/Zotlabs/Module/Directory.php b/Zotlabs/Module/Directory.php
index caf0190ae..b1552a694 100644
--- a/Zotlabs/Module/Directory.php
+++ b/Zotlabs/Module/Directory.php
@@ -64,6 +64,11 @@ class Directory extends \Zotlabs\Web\Controller {
return;
}
+ if(get_config('system','block_public_directory',false) && (! get_observer_hash())) {
+ notice( t('Public access denied.') . EOL);
+ return;
+ }
+
$observer = get_observer_hash();
$globaldir = get_directory_setting($observer, 'globaldir');
@@ -102,7 +107,7 @@ class Directory extends \Zotlabs\Web\Controller {
$common = array();
$index = 0;
foreach($r as $rr) {
- $common[$rr['xchan_addr']] = $rr['total'];
+ $common[$rr['xchan_addr']] = ((intval($rr['total']) > 0) ? intval($rr['total']) - 1 : 0);
$addresses[$rr['xchan_addr']] = $index++;
}
@@ -334,7 +339,7 @@ class Directory extends \Zotlabs\Web\Controller {
'ignlink' => $suggest ? z_root() . '/directory?ignore=' . $rr['hash'] : '',
'ignore_label' => t('Don\'t suggest'),
'common_friends' => (($common[$rr['address']]) ? intval($common[$rr['address']]) : ''),
- 'common_label' => t('Common connections:'),
+ 'common_label' => t('Common connections (estimated):'),
'common_count' => intval($common[$rr['address']]),
'safe' => $safe_mode
);