aboutsummaryrefslogtreecommitdiffstats
path: root/include/externals.php
diff options
context:
space:
mode:
authorJeroen <jeroen@jeroenpraat.nl>2014-07-23 13:03:12 +0000
committerJeroen <jeroen@jeroenpraat.nl>2014-07-23 13:03:12 +0000
commit02a4dac39bf4ff18f0879ff510a6255f9b890a82 (patch)
tree3a3139885b77b80744e82c5e3a77fa437302611f /include/externals.php
parent06470cd114c11c952181a0a254abe37846465997 (diff)
parent5c6a251213c7ec28ac113633cdc41f532bb6a7da (diff)
downloadvolse-hubzilla-02a4dac39bf4ff18f0879ff510a6255f9b890a82.tar.gz
volse-hubzilla-02a4dac39bf4ff18f0879ff510a6255f9b890a82.tar.bz2
volse-hubzilla-02a4dac39bf4ff18f0879ff510a6255f9b890a82.zip
Merge branch 'master' of https://github.com/friendica/red
Diffstat (limited to 'include/externals.php')
-rw-r--r--include/externals.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/externals.php b/include/externals.php
index 1d9fd2902..a96bf7c97 100644
--- a/include/externals.php
+++ b/include/externals.php
@@ -33,8 +33,32 @@ 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(strpos($url,$bl) !== false) {
+ $blacklisted = true;
+ break;
+ }
+ }
+ }
+
$attempts ++;
+ // make sure we can eventually break out if somebody blacklists all known sites
+
+ if($blacklisted) {
+ if($attempts > 20)
+ break;
+ $attempts --;
+ continue;
+ }
+
if($url) {
if($r[0]['site_pull'] !== '0000-00-00 00:00:00')
$mindate = urlencode($r[0]['site_pull']);