]> git.wh0rd.org Git - tt-rss.git/commitdiff
part of #276: if the html page has only one single feed, we subscribe to that one...
authorChristian Weiske <cweiske@cweiske.de>
Mon, 8 Nov 2010 19:48:15 +0000 (20:48 +0100)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 8 Nov 2010 20:33:04 +0000 (23:33 +0300)
functions.php

index a31e52e0bf5df4da02c16d8dda325ca9f8b02b2f..c17d9d64e6edc5507369e2469734e7bc57add81e 100644 (file)
        
                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,