aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-08-21 21:07:32 -0700
committerfriendica <info@friendica.com>2014-08-21 21:07:32 -0700
commit69d3e5468d970633412cbdc731a4e477181dbc8c (patch)
tree2f870d9951caf15b795cb3aa6ee9b50e5d79b8ba /include/zot.php
parent72a766432d90f6eec44641466e77567808f61aca (diff)
downloadvolse-hubzilla-69d3e5468d970633412cbdc731a4e477181dbc8c.tar.gz
volse-hubzilla-69d3e5468d970633412cbdc731a4e477181dbc8c.tar.bz2
volse-hubzilla-69d3e5468d970633412cbdc731a4e477181dbc8c.zip
provide the site blacklist everywhere it is needed
Diffstat (limited to 'include/zot.php')
-rw-r--r--include/zot.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/zot.php b/include/zot.php
index 8b0efe09d..41d0bc1eb 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -507,6 +507,22 @@ function zot_refresh($them,$channel = null, $force = false) {
function zot_gethub($arr) {
if($arr['guid'] && $arr['guid_sig'] && $arr['url'] && $arr['url_sig']) {
+
+ $blacklisted = false;
+ $bl1 = get_config('system','blacklisted_sites');
+ if(is_array($bl1) && $bl1) {
+ foreach($bl1 as $bl) {
+ if($bl && strpos($arr['url'],$bl) !== false) {
+ $blacklisted = true;
+ break;
+ }
+ }
+ }
+ if($blacklisted) {
+ logger('zot_gethub: blacklisted site: ' . $arr['url']);
+ return null;
+ }
+
$r = q("select * from hubloc
where hubloc_guid = '%s' and hubloc_guid_sig = '%s'
and hubloc_url = '%s' and hubloc_url_sig = '%s'