aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-06-22 15:03:47 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-06-22 15:03:47 -0700
commit0d8fcbe48dd92f37336dbb1bb86e609e8c86c488 (patch)
tree6991d9981a4e55e806dd7bb80629e2f21ac7aefb /include
parent0ad71b3efa7de4eb1f4313ffe4562ec83743bdc1 (diff)
downloadvolse-hubzilla-0d8fcbe48dd92f37336dbb1bb86e609e8c86c488.tar.gz
volse-hubzilla-0d8fcbe48dd92f37336dbb1bb86e609e8c86c488.tar.bz2
volse-hubzilla-0d8fcbe48dd92f37336dbb1bb86e609e8c86c488.zip
discovered a couple of loose ends in the per-member enable diaspora setting
Diffstat (limited to 'include')
-rwxr-xr-xinclude/diaspora.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index 33ad4211b..77a400604 100755
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -2371,6 +2371,24 @@ function diaspora_profile($importer,$xml,$msg) {
function diaspora_share($owner,$contact) {
$a = get_app();
+
+ $enabled = intval(get_config('system','diaspora_enabled'));
+ if(! $enabled) {
+ logger('diaspora_share: disabled');
+ return;
+ }
+
+ $allowed = get_pconfig($owner['channel_id'],'system','diaspora_allowed');
+ if($allowed === false)
+ $allowed = 1;
+
+ if(! intval($allowed)) {
+ logger('diaspora_share: disallowed for channel ' . $importer['channel_name']);
+ return;
+ }
+
+
+
$myaddr = $owner['channel_address'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
if(! array_key_exists('xchan_hash',$contact)) {
@@ -2947,6 +2965,14 @@ function diaspora_transmit($owner,$contact,$slap,$public_batch,$queue_run=false)
return 200;
}
+ $allowed = get_pconfig($owner['channel_id'],'system','diaspora_allowed');
+ if($allowed === false)
+ $allowed = 1;
+
+ if(! intval($allowed)) {
+ return 200;
+ }
+
if($public_batch)
$dest_url = $contact['hubloc_callback'] . '/public';
else