aboutsummaryrefslogtreecommitdiffstats
path: root/mod/settings.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-06-09 18:50:11 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-06-09 18:50:11 -0700
commitd08c43d80ceb5fa6c96c328b8b36b59f4bb8e6f6 (patch)
treef7f9213f58af440f50fe572052aa03e414537a0f /mod/settings.php
parentfaa7f97c25d40e842d3c09b3d7d5710e81a586c4 (diff)
downloadvolse-hubzilla-d08c43d80ceb5fa6c96c328b8b36b59f4bb8e6f6.tar.gz
volse-hubzilla-d08c43d80ceb5fa6c96c328b8b36b59f4bb8e6f6.tar.bz2
volse-hubzilla-d08c43d80ceb5fa6c96c328b8b36b59f4bb8e6f6.zip
toggle diaspora protocol on a per-channel level in addition to the existing per site setting. Default is enabled if the site setting is enabled.
Diffstat (limited to 'mod/settings.php')
-rw-r--r--mod/settings.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/mod/settings.php b/mod/settings.php
index 692668060..b0ba04dfc 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -124,6 +124,7 @@ function settings_post(&$a) {
call_hooks('feature_settings_post', $_POST);
if($_POST['dspr-submit']) {
+ set_pconfig(local_channel(),'system','diaspora_allowed',intval($_POST['dspr_allowed']));
set_pconfig(local_channel(),'system','diaspora_public_comments',intval($_POST['dspr_pubcomment']));
set_pconfig(local_channel(),'system','prevent_tag_hijacking',intval($_POST['dspr_hijack']));
info( t('Diaspora Policy Settings updated.') . EOL);
@@ -667,12 +668,13 @@ function settings_content(&$a) {
$settings_addons = t('No feature settings configured');
if($diaspora_enabled) {
+ $dspr_allowed = get_pconfig(local_channel(),'system','diaspora_allowed');
+ if($dspr_allowed === false)
+ $dspr_allowed = 1;
$pubcomments = get_pconfig(local_channel(),'system','diaspora_public_comments');
if($pubcomments === false)
$pubcomments = 1;
$hijacking = get_pconfig(local_channel(),'system','prevent_tag_hijacking');
-
-
}
call_hooks('feature_settings', $settings_addons);
@@ -684,6 +686,7 @@ function settings_content(&$a) {
'$diaspora_enabled' => $diaspora_enabled,
'$dsprdesc' => t('Settings for the built-in Diaspora emulator'),
'$pubcomments' => array('dspr_pubcomment', t('Allow any Diaspora member to comment on your public posts'), $pubcomments, '', $yes_no),
+ '$dspr_allowed' => array('dspr_allowed', t('Enable the Diaspora protocol for this channel'), $dspr_allowed, '', $yes_no),
'$dsprtitle' => t('Diaspora Policy Settings'),
'$hijacking' => array('dspr_hijack', t('Prevent your hashtags from being redirected to other sites'), $hijacking, '', $yes_no),
'$dsprsubmit' => t('Submit'),