aboutsummaryrefslogtreecommitdiffstats
path: root/include/diaspora.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-04-04 14:13:34 -0700
committerfriendica <info@friendica.com>2012-04-04 14:13:34 -0700
commit62c60fd53d7ace3213af24f4745d8757deb9a1e2 (patch)
tree883cbebfe96f049c9ef181d99e574f30231def28 /include/diaspora.php
parent51658826f932437dfba0704e0dc7bf53af84870f (diff)
downloadvolse-hubzilla-62c60fd53d7ace3213af24f4745d8757deb9a1e2.tar.gz
volse-hubzilla-62c60fd53d7ace3213af24f4745d8757deb9a1e2.tar.bz2
volse-hubzilla-62c60fd53d7ace3213af24f4745d8757deb9a1e2.zip
bug: diaspora_enabled setting turns it on but doesn't fully turn it off.
Diffstat (limited to 'include/diaspora.php')
-rwxr-xr-xinclude/diaspora.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index 04238f17c..9951cf423 100755
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -9,6 +9,10 @@ require_once('include/queue_fn.php');
function diaspora_dispatch_public($msg) {
+ $enabled = intval(get_config('system','diaspora_enabled'));
+ if(! $enabled)
+ 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 +33,10 @@ function diaspora_dispatch($importer,$msg) {
$ret = 0;
+ $enabled = intval(get_config('system','diaspora_enabled'));
+ if(! $enabled)
+ return;
+
// php doesn't like dashes in variable names
$msg['message'] = str_replace(