From: Matt Katz Date: Fri, 9 Apr 2010 23:48:31 +0000 (-0400) Subject: added function for publish_opml X-Git-Tag: 1.4.2~14 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e0dc56d4668afb759b8cdd8cbd7ee6094917b673;p=tt-rss.git added function for publish_opml --- diff --git a/functions.php b/functions.php index 1133f925..78adfdbc 100644 --- a/functions.php +++ b/functions.php @@ -5732,6 +5732,22 @@ return $url_path; } + function opml_publish_url($link){ + $url_path = ""; + + + if ($_SERVER['HTTPS'] != "on") { + $url_path = "http://"; + } else { + $url_path = "https://"; + } + + $url_path .= $_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']); + $url_path .= "/opml.php?op=publish&key=" . + get_pref($link, "_PREFS_PUBLISH_KEY", $_SESSION["uid"]); + + return $url_path; + } /** * Purge a feed contents, marked articles excepted.