From 5ae35b9dee87e9e2616f04b6ac3de32d291cdb72 Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Thu, 3 Nov 2016 09:22:04 +0800 Subject: [PATCH] MDL-56654 blogs: Display RSS link in the page --- blog/index.php | 11 ++++++++--- blog/rsslib.php | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/blog/index.php b/blog/index.php index e639df37cbc..664d70aa6fb 100644 --- a/blog/index.php +++ b/blog/index.php @@ -229,10 +229,11 @@ $courseid = (empty($courseid)) ? SITEID : $courseid; $blogheaders = blog_get_headers(); +$rsscontext = null; +$filtertype = null; +$thingid = null; +$rsstitle = ''; if ($CFG->enablerssfeeds) { - $rsscontext = null; - $filtertype = null; - $thingid = null; list($thingid, $rsscontext, $filtertype) = blog_rss_get_params($blogheaders['filters']); if (empty($rsscontext)) { $rsscontext = context_system::instance(); @@ -275,6 +276,10 @@ echo $OUTPUT->heading($blogheaders['heading'], 2); $bloglisting = new blog_listing($blogheaders['filters']); $bloglisting->print_entries(); +if ($CFG->enablerssfeeds) { + blog_rss_print_link($rsscontext, $filtertype, $thingid, $tagid, get_string('rssfeed', 'blog')); +} + echo $OUTPUT->footer(); $eventparams = array( 'other' => array('entryid' => $entryid, 'tagid' => $tagid, 'userid' => $userid, 'modid' => $modid, 'groupid' => $groupid, diff --git a/blog/rsslib.php b/blog/rsslib.php index 760a0ea4221..231071a9486 100644 --- a/blog/rsslib.php +++ b/blog/rsslib.php @@ -83,7 +83,7 @@ function blog_rss_print_link($context, $filtertype, $filterselect = 0, $tagid = $url = blog_rss_get_url($context->id, $userid, $filtertype, $filterselect, $tagid); $rsspix = $OUTPUT->pix_url('i/rss'); - print '
'.get_string('rss').'
'; + print '
'.get_string('rss').'
'; } /**