aboutsummaryrefslogtreecommitdiffstats
path: root/include/externals.php
diff options
context:
space:
mode:
authorHaakon Meland Eriksen <haakon.eriksen@far.no>2015-12-01 00:35:01 +0100
committerHaakon Meland Eriksen <haakon.eriksen@far.no>2015-12-01 00:35:01 +0100
commitb96f09bb3aeee403038755ab5f6e6b53654cb145 (patch)
treeca72f5712b7467e7f968f87172cec82164435894 /include/externals.php
parent519862115c143cf3f645a172f39e5a0b4dc9d5bb (diff)
parent4b191fb55860c5f366c17ecaacc59ccbdd936885 (diff)
downloadvolse-hubzilla-b96f09bb3aeee403038755ab5f6e6b53654cb145.tar.gz
volse-hubzilla-b96f09bb3aeee403038755ab5f6e6b53654cb145.tar.bz2
volse-hubzilla-b96f09bb3aeee403038755ab5f6e6b53654cb145.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/externals.php')
-rw-r--r--include/externals.php21
1 files changed, 8 insertions, 13 deletions
diff --git a/include/externals.php b/include/externals.php
index 18c034bb2..3a3a32420 100644
--- a/include/externals.php
+++ b/include/externals.php
@@ -28,7 +28,10 @@ function externals_run($argv, $argc){
}
else {
$randfunc = db_getfunc('RAND');
- $r = q("select site_url, site_pull from site where site_url != '%s' and site_flags != %d and site_type = %d order by $randfunc limit 1",
+
+ // fixme this query does not deal with directory realms.
+
+ $r = q("select site_url, site_pull from site where site_url != '%s' and site_flags != %d and site_type = %d and site_dead = 0 order by $randfunc limit 1",
dbesc(z_root()),
intval(DIRECTORY_MODE_STANDALONE),
intval(SITE_TYPE_ZOT)
@@ -37,19 +40,11 @@ function externals_run($argv, $argc){
$url = $r[0]['site_url'];
}
- // Note: blacklisted sites must be stored in the config as an array.
- // No simple way to turn this into a personal config because we have no identity here.
- // For that we probably need a variant of superblock.
-
$blacklisted = false;
- $bl1 = get_config('system','blacklisted_sites');
- if(is_array($bl1) && $bl1) {
- foreach($bl1 as $bl) {
- if($bl && strpos($url,$bl) !== false) {
- $blacklisted = true;
- break;
- }
- }
+
+ if(! check_siteallowed($url)) {
+ logger('blacklisted site: ' . $url);
+ $blacklisted = true;
}
$attempts ++;