summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorChristian Weiske <[email protected]>2010-11-08 20:48:15 +0100
committerAndrew Dolgov <[email protected]>2010-11-08 23:33:04 +0300
commitec16da866b94a9ddc00bffb0ed8c242edc33b4d1 (patch)
treebb9944a117579e0bd3360e864bbf779041ed1a69 /functions.php
parentf33479dab87b7e34692201db1c1016e4ffa7c990 (diff)
part of #276: if the html page has only one single feed, we subscribe to that one directly without asking
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/functions.php b/functions.php
index a31e52e0b..c17d9d64e 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,