aboutsummaryrefslogtreecommitdiffstats
path: root/include/socgraph.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-03-04 17:36:52 -0800
committerMario Vavti <mario@mariovavti.com>2018-03-05 08:57:47 +0100
commitf02314dfd877ab13852ae169d40dcbcc65344bfb (patch)
treec6a801093532d662a1e50a83f57497060203524c /include/socgraph.php
parentaf46c192bf7c217b7348082cbcacd3ea4659fae3 (diff)
downloadvolse-hubzilla-f02314dfd877ab13852ae169d40dcbcc65344bfb.tar.gz
volse-hubzilla-f02314dfd877ab13852ae169d40dcbcc65344bfb.tar.bz2
volse-hubzilla-f02314dfd877ab13852ae169d40dcbcc65344bfb.zip
fix some issues with friend suggestions on standalone sites with no 'suggestme' volunteers. This wrongly pulled up a site directory suggesting everybody on the site. While a better outcome than finding nobody, this does not fit with our ethical design goals. If there are no friends of friends, we will only suggest those who volunteer to be on the default suggestion list. Also do not attempt to load poco data from dead sites.
Diffstat (limited to 'include/socgraph.php')
-rw-r--r--include/socgraph.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/socgraph.php b/include/socgraph.php
index 87a880202..6cddbbaac 100644
--- a/include/socgraph.php
+++ b/include/socgraph.php
@@ -52,7 +52,7 @@ function poco_load($xchan = '', $url = null) {
elseif($s['return_code'] == 404)
logger('poco_load: nothing found');
else
- logger('poco_load: returns ' . print_r($s,true));
+ logger('poco_load: returns ' . print_r($s,true), LOGGER_DATA);
return;
}
@@ -288,11 +288,14 @@ function suggestion_query($uid, $myxchan, $start = 0, $limit = 80) {
function update_suggestions() {
- $dirmode = get_config('system', 'directory_mode');
- if($dirmode === false)
- $dirmode = DIRECTORY_MODE_NORMAL;
+ $dirmode = get_config('system', 'directory_mode', DIRECTORY_MODE_NORMAL);
- if(($dirmode == DIRECTORY_MODE_PRIMARY) || ($dirmode == DIRECTORY_MODE_STANDALONE)) {
+ if($dirmode == DIRECTORY_MODE_STANDALONE) {
+ poco_load('', z_root() . '/poco');
+ return;
+ }
+
+ if($dirmode == DIRECTORY_MODE_PRIMARY) {
$url = z_root() . '/sitelist';
}
else {