aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xinclude/diaspora.php26
-rw-r--r--version.inc2
2 files changed, 27 insertions, 1 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
diff --git a/version.inc b/version.inc
index 03a0995b5..cbaf6aa9c 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2015-06-21.1070
+2015-06-22.1071