Merge branch 'master' of MatthieuS/tt-rss into master

This commit is contained in:
fox 2018-05-23 09:08:15 +00:00 committed by Gogs
commit e888879a42
1 changed files with 4 additions and 4 deletions

View File

@ -1466,6 +1466,10 @@ class Feeds extends Handler_Protected {
$contents = @fetch_file_contents($url, false, $auth_login, $auth_pass); $contents = @fetch_file_contents($url, false, $auth_login, $auth_pass);
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_SUBSCRIBE_FEED) as $plugin) {
$contents = $plugin->hook_subscribe_feed($contents, $url, $auth_login, $auth_pass);
}
if (!$contents) { if (!$contents) {
if (preg_match("/cloudflare\.com/", $fetch_last_error_content)) { if (preg_match("/cloudflare\.com/", $fetch_last_error_content)) {
$fetch_last_error .= " (feed behind Cloudflare)"; $fetch_last_error .= " (feed behind Cloudflare)";
@ -1474,10 +1478,6 @@ class Feeds extends Handler_Protected {
return array("code" => 5, "message" => $fetch_last_error); return array("code" => 5, "message" => $fetch_last_error);
} }
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_SUBSCRIBE_FEED) as $plugin) {
$contents = $plugin->hook_subscribe_feed($contents, $url, $auth_login, $auth_pass);
}
if (is_html($contents)) { if (is_html($contents)) {
$feedUrls = get_feeds_from_html($url, $contents); $feedUrls = get_feeds_from_html($url, $contents);