aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xinclude/diaspora.php5
-rwxr-xr-xmod/receive.php7
2 files changed, 12 insertions, 0 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index 37d5990ee..06df9c24a 100755
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -2283,6 +2283,11 @@ function diaspora_send_mail($item,$owner,$contact) {
function diaspora_transmit($owner,$contact,$slap,$public_batch) {
+ $enabled = intval(get_config('system','diaspora_enabled'));
+ if(! $enabled) {
+ return 200;
+ }
+
$a = get_app();
$logid = random_string(4);
$dest_url = (($public_batch) ? $contact['batch'] : $contact['notify']);
diff --git a/mod/receive.php b/mod/receive.php
index 950bf0bd3..2bd3cc65b 100755
--- a/mod/receive.php
+++ b/mod/receive.php
@@ -12,6 +12,13 @@ require_once('include/diaspora.php');
function receive_post(&$a) {
+
+ $enabled = intval(get_config('system','diaspora_enabled'));
+ if(! $enabled) {
+ logger('mod-diaspora: disabled');
+ http_status_exit(500);
+ }
+
$public = false;
if(($a->argc == 2) && ($a->argv[1] === 'public')) {