aboutsummaryrefslogtreecommitdiffstats
path: root/include/follow.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 /include/follow.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 'include/follow.php')
-rw-r--r--include/follow.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/follow.php b/include/follow.php
index fd4e1597a..1e5df4cd5 100644
--- a/include/follow.php
+++ b/include/follow.php
@@ -135,6 +135,15 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
$result['message'] = t('Protocol disabled.');
return $result;
}
+
+ $allowed = get_pconfig($uid,'system','diaspora_allowed');
+ if($allowed === false)
+ $allowed = 1;
+
+ if(! intval($allowed)) {
+ $result['message'] = t('Protocol blocked for this channel.');
+ return $result;
+ }
}
$their_perms = 0;