aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Directory.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-03-04 17:36:52 -0800
committerzotlabs <mike@macgirvin.com>2018-03-04 17:40:38 -0800
commit59a2057fa0faac2db7b36a5d6c40435c6e13d378 (patch)
treeddedcaf3c023d4f9670063d6afaa230def78df1b /Zotlabs/Module/Directory.php
parentbe6619d9c06a31fa211c6200aad377d94c1fd0b5 (diff)
downloadvolse-hubzilla-59a2057fa0faac2db7b36a5d6c40435c6e13d378.tar.gz
volse-hubzilla-59a2057fa0faac2db7b36a5d6c40435c6e13d378.tar.bz2
volse-hubzilla-59a2057fa0faac2db7b36a5d6c40435c6e13d378.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 'Zotlabs/Module/Directory.php')
-rw-r--r--Zotlabs/Module/Directory.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/Zotlabs/Module/Directory.php b/Zotlabs/Module/Directory.php
index 85c0be6b6..62a1670f9 100644
--- a/Zotlabs/Module/Directory.php
+++ b/Zotlabs/Module/Directory.php
@@ -101,6 +101,11 @@ class Directory extends \Zotlabs\Web\Controller {
if($suggest) {
$r = suggestion_query(local_channel(),get_observer_hash());
+
+ if(! $r) {
+ notice( t('No default suggestions were found.') . EOL);
+ return;
+ }
// Remember in which order the suggestions were
$addresses = array();