summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-01-22 11:03:45 +0300
committerAndrew Dolgov <[email protected]>2017-01-22 11:03:45 +0300
commitfa287f6b116564f46aa20ee7da1a9d8aed311b97 (patch)
treeee44fc113d1cb3106c2d2766b5d705762b418dd4 /include
parent4441fc6f3b5d2ae0df5c0a8797317c632b1d4d23 (diff)
parent5800d3d505c51da61313ffe0ae30b8b08c8fd347 (diff)
Merge branch 'af-comics-gocomics-feed' into 'master'
Update af_comics plugin to support GoComics. Updates the af_comics plugin to support new GoComics site, which dropped native RSS feeds. See merge request !42
Diffstat (limited to 'include')
-rw-r--r--[-rwxr-xr-x]include/functions.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/functions.php b/include/functions.php
index de93267ee..17bd9f371 100755..100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -368,6 +368,7 @@
$timeout = isset($options["timeout"]) ? $options["timeout"] : false;
$timestamp = isset($options["timestamp"]) ? $options["timestamp"] : 0;
$useragent = isset($options["useragent"]) ? $options["useragent"] : false;
+ $followlocation = isset($options["followlocation"]) ? $options["followlocation"] : true;
$url = ltrim($url, ' ');
$url = str_replace(' ', '%20', $url);
@@ -388,7 +389,7 @@
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout ? $timeout : FILE_FETCH_CONNECT_TIMEOUT);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout ? $timeout : FILE_FETCH_TIMEOUT);
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, !ini_get("open_basedir"));
+ curl_setopt($ch, CURLOPT_FOLLOWLOCATION, !ini_get("open_basedir") && $followlocation);
curl_setopt($ch, CURLOPT_MAXREDIRS, 20);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);