summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-04-01 09:36:29 +0400
committerAndrew Dolgov <[email protected]>2011-04-01 09:36:29 +0400
commitb0f379dfff8738defba307341887ee5938625f55 (patch)
treed010c9bd98d2b3f992036fa19fce6bd91d5a0c33 /functions.php
parent6f1c5d1760a8a6f753cf35098d45507ed18d0f71 (diff)
add experimental support for pubsubhubbub in published feed, bump config version (refs #251)
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php19
1 files changed, 14 insertions, 5 deletions
diff --git a/functions.php b/functions.php
index d33b30454..1e843dd14 100644
--- a/functions.php
+++ b/functions.php
@@ -110,6 +110,7 @@
require_once "lib/magpierss/rss_fetch.inc";
require_once 'lib/magpierss/rss_utils.inc';
require_once 'lib/htmlpurifier/library/HTMLPurifier.auto.php';
+ require_once 'lib/pubsubhubbub/publisher.php';
$config = HTMLPurifier_Config::createDefault();
@@ -3583,13 +3584,19 @@
$feed_site_url = $qfh_ret[2];
$last_error = $qfh_ret[3];
-// if (!$feed_site_url) $feed_site_url = "http://localhost/";
+ if (!$feed_site_url) $feed_site_url = get_self_url_prefix();
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>
<?xml-stylesheet type=\"text/xsl\" href=\"rss.xsl\"?>
- <rss version=\"2.0\">
- <channel>
- <title>$feed_title</title>
+ <rss version=\"2.0\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\"
+ xmlns:atom=\"http://www.w3.org/2005/Atom\">
+ <channel>";
+
+ if (PUBSUBHUBBUB_HUB && $feed == -2) {
+ print "<atom:link rel='hub' href='".PUBSUBHUBBUB_HUB."'/>";
+ }
+
+ print "<title>$feed_title</title>
<link>$feed_site_url</link>
<description>Feed generated by Tiny Tiny RSS</description>";
@@ -4100,8 +4107,10 @@
$reply .= "<option value=\"emailArticle(false)\">".__('Forward by email').
"</option>";
+ if ($is_cat) $cat_q = "&is_cat=$is_cat";
+
$rss_link = htmlspecialchars(get_self_url_prefix() .
- "/backend.php?op=rss&id=$feed_id&is_cat=$is_cat&view_mode=$view_mode$search_q");
+ "/backend.php?op=rss&id=$feed_id$cat_q$search_q");
$reply .= "<option value=\"0\" disabled=\"1\">".__('Feed:')."</option>";