]> git.wh0rd.org Git - tt-rss.git/commitdiff
correctly import feed://... urls
authorAndrew Dolgov <fox@bah.spb.su>
Wed, 14 Feb 2007 16:17:31 +0000 (17:17 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Wed, 14 Feb 2007 16:17:31 +0000 (17:17 +0100)
functions.php

index 1eb3ef2f7d7e396a766a15b04842558dd380d0bb..df2ec5880db0b6f22dc5bef5ebc41add64055298 100644 (file)
 
        function subscribe_to_feed($link, $feed_link, $cat_id = 0) {
 
+               # check for feed:http://url
                $feed_link = trim(preg_replace("/^feed:/", "", $feed_link));
 
+               # check for feed://URL
+               if (strstr($feed_link, "//") == 0) {
+                       $feed_link = "http:$feed_link";
+               }
+
                if ($feed_link == "") return;
 
                if ($cat_id == "0" || !$cat_id) {