mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-04-29 02:34:05 -04:00
Handle redirects when scraping feed from HTML (#7654)
* Handle redirects when scraping feed from HTML * pass codesniffer * pass PHPStan * Optimize * Another approach relying on HTML base Standard way to save an HTML document with relative references * Fix case of existing HTML base which should not be overriden --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
This commit is contained in:
@@ -48,7 +48,7 @@ class FreshRSS_extension_Controller extends FreshRSS_ActionController {
|
||||
$cacheFile = CACHE_PATH . '/extension_list.json';
|
||||
if (FreshRSS_Context::userConf()->retrieve_extension_list === true) {
|
||||
if (!file_exists($cacheFile) || (time() - (filemtime($cacheFile) ?: 0) > 86400)) {
|
||||
$json = httpGet($extensionListUrl, $cacheFile, 'json');
|
||||
$json = httpGet($extensionListUrl, $cacheFile, 'json')['body'];
|
||||
} else {
|
||||
$json = @file_get_contents($cacheFile) ?: '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user