aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-06-09 19:39:21 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-06-09 19:39:21 -0700
commiteb6a1f838724504f0034d51a28567ea9a8119b54 (patch)
tree6771f131d715e93a5ef3329b3fcb1a63b8c4e6e1 /include
parent03357481f73d506ae36be9858dc757842408c6a9 (diff)
parent9592f7f3e6884e2b8b77c713634393fdf4e2ff7c (diff)
downloadvolse-hubzilla-eb6a1f838724504f0034d51a28567ea9a8119b54.tar.gz
volse-hubzilla-eb6a1f838724504f0034d51a28567ea9a8119b54.tar.bz2
volse-hubzilla-eb6a1f838724504f0034d51a28567ea9a8119b54.zip
Merge branch 'master' of https://github.com/redmatrix/redmatrix
Diffstat (limited to 'include')
-rwxr-xr-xinclude/diaspora.php19
-rw-r--r--include/follow.php9
2 files changed, 28 insertions, 0 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index 8968ee5f4..f0bd5d813 100755
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -64,6 +64,15 @@ function diaspora_dispatch($importer,$msg) {
return;
}
+ $allowed = get_pconfig($importer['channel_id'],'system','diaspora_allowed');
+ if($allowed === false)
+ $allowed = 1;
+
+ if(! intval($allowed)) {
+ logger('mod-diaspora: disallowed for channel ' . $importer['channel_name']);
+ return;
+ }
+
// php doesn't like dashes in variable names
$msg['message'] = str_replace(
@@ -169,6 +178,16 @@ function diaspora_process_outbound($arr) {
*/
+ $allowed = get_pconfig($arr['channel']['channel_id'],'system','diaspora_allowed');
+ if($allowed === false)
+ $allowed = 1;
+
+ if(! intval($allowed)) {
+ logger('mod-diaspora: disallowed for channel ' . $arr['channel']['channel_name']);
+ return;
+ }
+
+
if($arr['location'])
return;
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;