1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 04:35:56 +00:00

move all $fetch globals to UrlHelper

This commit is contained in:
Andrew Dolgov
2021-02-28 10:12:57 +03:00
parent e2cbb54b2c
commit afc7142250
12 changed files with 83 additions and 107 deletions

View File

@@ -190,8 +190,6 @@ class Af_Readability extends Plugin {
public function extract_content($url) {
global $fetch_effective_url;
$tmp = UrlHelper::fetch([
"url" => $url,
"http_accept" => "text/*",
@@ -224,13 +222,13 @@ class Af_Readability extends Plugin {
foreach ($entries as $entry) {
if ($entry->hasAttribute("href")) {
$entry->setAttribute("href",
rewrite_relative_url($fetch_effective_url, $entry->getAttribute("href")));
rewrite_relative_url(UrlHelper::$fetch_effective_url, $entry->getAttribute("href")));
}
if ($entry->hasAttribute("src")) {
$entry->setAttribute("src",
rewrite_relative_url($fetch_effective_url, $entry->getAttribute("src")));
rewrite_relative_url(UrlHelper::$fetch_effective_url, $entry->getAttribute("src")));
}
}