correctly import feed://... urls

This commit is contained in:
Andrew Dolgov 2007-02-14 17:17:31 +01:00
parent e9aecd4d70
commit b3dfe8bae7
1 changed files with 6 additions and 0 deletions

View File

@ -1938,8 +1938,14 @@
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) {