MDL-37467 Do not provide blog posts via RSS when blogging is disabled

This commit is contained in:
David Mudrák
2013-01-10 18:17:42 +01:00
committed by Eloy Lafuente (stronk7)
parent dc21606e4f
commit 52f9e3ee56
+5
View File
@@ -104,6 +104,11 @@ function blog_rss_get_params($filters) {
function blog_rss_get_feed($context, $args) {
global $CFG, $SITE, $DB;
if (empty($CFG->bloglevel)) {
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 '';