diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-06-23 17:30:35 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-06-23 17:30:35 -0700 |
commit | 833098e3460e0a2c7fbffaa59163af815f419e68 (patch) | |
tree | b13bc70bf34288659be12c64ab7a5ed0ce131dd2 /include/diaspora.php | |
parent | ae6612025dcd31349056364d0c701bfda58470db (diff) | |
parent | 7975bc828fc9ae1cf9b92cc2147297a46524d59f (diff) | |
download | volse-hubzilla-833098e3460e0a2c7fbffaa59163af815f419e68.tar.gz volse-hubzilla-833098e3460e0a2c7fbffaa59163af815f419e68.tar.bz2 volse-hubzilla-833098e3460e0a2c7fbffaa59163af815f419e68.zip |
Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
include/items.php
mod/item.php
Diffstat (limited to 'include/diaspora.php')
-rwxr-xr-x | include/diaspora.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/diaspora.php b/include/diaspora.php index 18e131f8f..f46ddc764 100755 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -2357,6 +2357,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)) { @@ -2932,6 +2950,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 |