From fe7e411e7cebec62f20157cbcd19801bbba65ef7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Mudr=C3=A1k?= Date: Thu, 10 Jan 2013 16:57:10 +0100 Subject: [PATCH] MDL-37467 Do not provide blog posts via RSS when blogging is disabled --- blog/rsslib.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/blog/rsslib.php b/blog/rsslib.php index 73cd5ee47f8..22c9612fd9f 100644 --- a/blog/rsslib.php +++ b/blog/rsslib.php @@ -158,6 +158,11 @@ function blog_rss_get_params($filters) { function blog_rss_get_feed($context, $args) { global $CFG, $SITE, $DB; + if (empty($CFG->enableblogs)) { + debugging('Blogging disabled on this site, RSS feeds are not available'); + return null; + } + if (empty($CFG->enablerssfeeds)) { debugging('Sorry, RSS feeds are disabled on this site'); return '';