Browse files

MDL-30202 forum rss: move check to the end of if statement to prevent…

… unnecessary db process if rss is disable
  • Loading branch information...
1 parent dbf4433 commit 52eebcc8df07e00e92ec299392818c06b8d886c6 @rwijaya rwijaya committed Nov 30, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 mod/forum/lib.php
View
2 mod/forum/lib.php
@@ -7439,7 +7439,7 @@ function forum_extend_settings_navigation(settings_navigation $settingsnav, navi
$hascourseaccess = ($PAGE->course->id == SITEID) || can_access_course($PAGE->course, $userid);
$enablerssfeeds = !empty($CFG->enablerssfeeds) && !empty($CFG->forum_enablerssfeeds);
- if ($hascourseaccess && $enablerssfeeds && $forumobject->rsstype && $forumobject->rssarticles) {
+ if ($enablerssfeeds && $forumobject->rsstype && $forumobject->rssarticles && $hascourseaccess) {
if (!function_exists('rss_get_url')) {
require_once("$CFG->libdir/rsslib.php");

0 comments on commit 52eebcc

Please sign in to comment.