]> git.wh0rd.org - tt-rss.git/commitdiff
added function for publish_opml
authorMatt Katz <mattkatz@ubuntu.ubuntu-domain>
Fri, 9 Apr 2010 23:48:31 +0000 (19:48 -0400)
committerMatt Katz <mattkatz@ubuntu.ubuntu-domain>
Fri, 9 Apr 2010 23:48:31 +0000 (19:48 -0400)
functions.php

index 1133f925b49a12905eb163c00a8392fe4a00d6d7..78adfdbcbd153101f28b69ce6fad8df3e3215249 100644 (file)
 
                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.