From a4611b9d02105d0f33e3673533bf7b7223590a37 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 b6195bd7d5a..58e76d5cb90 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 '';