aboutsummaryrefslogtreecommitdiffstats
path: root/include/externals.php
diff options
context:
space:
mode:
authorPaolo T <tuscanhobbit@users.noreply.github.com>2014-08-18 18:55:18 +0200
committerPaolo T <tuscanhobbit@users.noreply.github.com>2014-08-18 18:55:18 +0200
commitb5d1c7865b14fa60c35618b4179eb3c91949a441 (patch)
tree38ddb2fcab0f4c2c3baf6917e3544148cbe1eb9e /include/externals.php
parent3b979dd2a9f8bb8f569c234408d02dfd1e7039d7 (diff)
parentd9ff121930554aa9bcad4f4ceffeb9b5e3b83d17 (diff)
downloadvolse-hubzilla-b5d1c7865b14fa60c35618b4179eb3c91949a441.tar.gz
volse-hubzilla-b5d1c7865b14fa60c35618b4179eb3c91949a441.tar.bz2
volse-hubzilla-b5d1c7865b14fa60c35618b4179eb3c91949a441.zip
Merge pull request #1 from friendica/master
Red master has been merged
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']);