aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-01-18 13:20:23 +0100
committerMario Vavti <mario@mariovavti.com>2018-01-18 13:20:23 +0100
commita0e1a8e0a20df640ef951dee4fb3c6ed19faee03 (patch)
tree672bdd787b969c495d2a279da14c0781adb89a29 /Zotlabs/Module
parenta486c906863a59c0ebed80192b2c0e9aeb111f12 (diff)
parenteb86ffefbfb38cf76316940a6aa164530f9b9348 (diff)
downloadvolse-hubzilla-a0e1a8e0a20df640ef951dee4fb3c6ed19faee03.tar.gz
volse-hubzilla-a0e1a8e0a20df640ef951dee4fb3c6ed19faee03.tar.bz2
volse-hubzilla-a0e1a8e0a20df640ef951dee4fb3c6ed19faee03.zip
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Admin/Site.php4
-rw-r--r--Zotlabs/Module/Dirsearch.php5
-rw-r--r--Zotlabs/Module/Pubstream.php15
3 files changed, 19 insertions, 5 deletions
diff --git a/Zotlabs/Module/Admin/Site.php b/Zotlabs/Module/Admin/Site.php
index 86558e93c..037f49277 100644
--- a/Zotlabs/Module/Admin/Site.php
+++ b/Zotlabs/Module/Admin/Site.php
@@ -43,6 +43,7 @@ class Site {
$allowed_sites = ((x($_POST,'allowed_sites')) ? notags(trim($_POST['allowed_sites'])) : '');
$force_publish = ((x($_POST,'publish_all')) ? True : False);
$disable_discover_tab = ((x($_POST,'disable_discover_tab')) ? False : True);
+ $site_firehose = ((x($_POST,'site_firehose')) ? True : False);
$login_on_homepage = ((x($_POST,'login_on_homepage')) ? True : False);
$enable_context_help = ((x($_POST,'enable_context_help')) ? True : False);
$global_directory = ((x($_POST,'directory_submit_url')) ? notags(trim($_POST['directory_submit_url'])) : '');
@@ -135,6 +136,7 @@ class Site {
set_config('system','allowed_sites', $allowed_sites);
set_config('system','publish_all', $force_publish);
set_config('system','disable_discover_tab', $disable_discover_tab);
+ set_config('system','site_firehose', $site_firehose);
set_config('system','force_queue_threshold', $force_queue);
if ($global_directory == '') {
del_config('system', 'directory_submit_url');
@@ -314,6 +316,8 @@ class Site {
'$verify_email' => array('verify_email', t("Verify Email Addresses"), get_config('system','verify_email'), t("Check to verify email addresses used in account registration (recommended).")),
'$force_publish' => array('publish_all', t("Force publish"), get_config('system','publish_all'), t("Check to force all profiles on this site to be listed in the site directory.")),
'$disable_discover_tab' => array('disable_discover_tab', t('Import Public Streams'), $discover_tab, t('Import and allow access to public content pulled from other sites. Warning: this content is unmoderated.')),
+ '$site_firehose' => array('site_firehose', t('Site only Public Streams'), get_config('system','site_firehose'), t('Allow access to public content originating only from this site if Imported Public Streams are disabled.')),
+
'$login_on_homepage' => array('login_on_homepage', t("Login on Homepage"),((intval($homelogin) || $homelogin === false) ? 1 : '') , t("Present a login box to visitors on the home page if no other content has been configured.")),
'$enable_context_help' => array('enable_context_help', t("Enable context help"),((intval($enable_context_help) === 1 || $enable_context_help === false) ? 1 : 0) , t("Display contextual help for the current page when the help button is pressed.")),
diff --git a/Zotlabs/Module/Dirsearch.php b/Zotlabs/Module/Dirsearch.php
index 53ec1a850..08f1f7a13 100644
--- a/Zotlabs/Module/Dirsearch.php
+++ b/Zotlabs/Module/Dirsearch.php
@@ -97,7 +97,10 @@ class Dirsearch extends \Zotlabs\Web\Controller {
else
$sync = false;
-
+ if(($dirmode == DIRECTORY_MODE_STANDALONE) && (! $hub)) {
+ $hub = \App::get_hostname();
+ }
+
if($hub)
$hub_query = " and xchan_hash in (select hubloc_hash from hubloc where hubloc_host = '" . protect_sprintf(dbesc($hub)) . "') ";
else
diff --git a/Zotlabs/Module/Pubstream.php b/Zotlabs/Module/Pubstream.php
index c469a0eca..2c25e2ce0 100644
--- a/Zotlabs/Module/Pubstream.php
+++ b/Zotlabs/Module/Pubstream.php
@@ -17,9 +17,16 @@ class Pubstream extends \Zotlabs\Web\Controller {
return login();
}
- $disable_discover_tab = get_config('system','disable_discover_tab') || get_config('system','disable_discover_tab') === false;
- if($disable_discover_tab)
- return;
+ $site_firehose = ((intval(get_config('system','site_firehose',0))) ? true : false);
+ $net_firehose = ((get_config('system','disable_discover_tab',1)) ? false : true);
+
+ if(! ($site_firehose || $net_firehose)) {
+ return '';
+ }
+
+ if($net_firehose) {
+ $site_firehose = false;
+ }
$mid = ((x($_REQUEST,'mid')) ? $_REQUEST['mid'] : '');
@@ -142,7 +149,7 @@ class Pubstream extends \Zotlabs\Web\Controller {
require_once('include/channel.php');
require_once('include/security.php');
- if(get_config('system','site_firehose')) {
+ if($site_firehose) {
$uids = " and item.uid in ( " . stream_perms_api_uids(PERMS_PUBLIC) . " ) and item_private = 0 and item_wall = 1 ";
}
else {