From: Christian Weiske Date: Mon, 8 Nov 2010 19:48:15 +0000 (+0100) Subject: part of #276: if the html page has only one single feed, we subscribe to that one... X-Git-Tag: 1.5.0~345 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=ec16da866b94a9ddc00bffb0ed8c242edc33b4d1;p=tt-rss.git part of #276: if the html page has only one single feed, we subscribe to that one directly without asking --- diff --git a/functions.php b/functions.php index a31e52e0..c17d9d64 100644 --- a/functions.php +++ b/functions.php @@ -2973,7 +2973,12 @@ if (db_num_rows($result) == 0) { if (url_is_html($url)) { - return 3; + $feedUrls = get_feeds_from_html($url); + if (count($feedUrls) != 1) { + return 3; + } + //use feed url as new URL + $url = key($feedUrls); } $result = db_query($link,