aboutsummaryrefslogtreecommitdiffstats
path: root/include/diaspora.php
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2012-04-08 10:33:32 +0200
committerzottel <github@zottel.net>2012-04-08 10:33:32 +0200
commitaaf5a81365b4cbcb3d1b9537b5544aeb5de66f4b (patch)
tree1d7e5f2b575b8836fefe76660f466cb176585d5c /include/diaspora.php
parent64a1367525ac920721943a08adec1124657df70d (diff)
parente3b2ac0735c908357dafb8670339fd34d3e2e6c0 (diff)
downloadvolse-hubzilla-aaf5a81365b4cbcb3d1b9537b5544aeb5de66f4b.tar.gz
volse-hubzilla-aaf5a81365b4cbcb3d1b9537b5544aeb5de66f4b.tar.bz2
volse-hubzilla-aaf5a81365b4cbcb3d1b9537b5544aeb5de66f4b.zip
Merge remote branch 'upstream/master'
Diffstat (limited to 'include/diaspora.php')
-rw-r--r--[-rwxr-xr-x]include/diaspora.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index 04238f17c..06df9c24a 100755..100644
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -9,6 +9,12 @@ require_once('include/queue_fn.php');
function diaspora_dispatch_public($msg) {
+ $enabled = intval(get_config('system','diaspora_enabled'));
+ if(! $enabled) {
+ logger('mod-diaspora: disabled');
+ return;
+ }
+
$r = q("SELECT `user`.* FROM `user` WHERE `user`.`uid` IN ( SELECT `contact`.`uid` FROM `contact` WHERE `contact`.`network` = '%s' AND `contact`.`addr` = '%s' ) AND `account_expired` = 0 ",
dbesc(NETWORK_DIASPORA),
dbesc($msg['author'])
@@ -29,6 +35,12 @@ function diaspora_dispatch($importer,$msg) {
$ret = 0;
+ $enabled = intval(get_config('system','diaspora_enabled'));
+ if(! $enabled) {
+ logger('mod-diaspora: disabled');
+ return;
+ }
+
// php doesn't like dashes in variable names
$msg['message'] = str_replace(
@@ -2271,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']);