From 7883b5931f69e159df828f5b2930e947b74f3b8e Mon Sep 17 00:00:00 2001 From: Ivan Mahonin Date: Mon, 9 May 2016 11:33:12 -0400 Subject: [PATCH] Show two "comments feed" buttons when both feed formats (RSS+Atom) activated --- .../serendipity_plugin_syndication.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/plugins/serendipity_plugin_syndication/serendipity_plugin_syndication.php b/plugins/serendipity_plugin_syndication/serendipity_plugin_syndication.php index 5f2e134a..a60e9786 100644 --- a/plugins/serendipity_plugin_syndication/serendipity_plugin_syndication.php +++ b/plugins/serendipity_plugin_syndication/serendipity_plugin_syndication.php @@ -203,10 +203,18 @@ class serendipity_plugin_syndication extends serendipity_plugin { } if (serendipity_db_bool($this->get_config('show_2.0c', false)) || serendipity_db_bool($this->get_config('show_comment_feed', false))) { - echo $this->generateFeedButton(($useAtom && ! $useRss ? serendipity_rewriteURL(PATH_FEEDS .'/comments.atom') : serendipity_rewriteURL(PATH_FEEDS .'/comments.rss2')), - $COMMENTS, - ($subtome ? $this->getOnclick(serendipity_rewriteURL(PATH_FEEDS .'/comments.rss2')) : ""), - $small_icon); + if ($useRss) { + echo $this->generateFeedButton( serendipity_rewriteURL(PATH_FEEDS .'/comments.rss2'), + $COMMENTS . ($useAtom ? " (RSS)": ""), + ($subtome ? $this->getOnclick(serendipity_rewriteURL(PATH_FEEDS .'/comments.rss2')) : ""), + $small_icon); + } + if ($useAtom) { + echo $this->generateFeedButton( serendipity_rewriteURL(PATH_FEEDS .'/comments.atom10'), + $COMMENTS . ($useRss ? " (Atom)": ""), + ($subtome ? $this->getOnclick(serendipity_rewriteURL(PATH_FEEDS .'/comments.atom10')) : ""), + $small_icon); + } } echo "\n"; }