mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-30202 forum rss: move check to the end of if statement to prevent unnecessary db process if rss is disable
This commit is contained in:
parent
dbf4433d75
commit
52eebcc8df
1 changed files with 1 additions and 1 deletions
|
@ -7439,7 +7439,7 @@ function forum_extend_settings_navigation(settings_navigation $settingsnav, navi
|
||||||
$hascourseaccess = ($PAGE->course->id == SITEID) || can_access_course($PAGE->course, $userid);
|
$hascourseaccess = ($PAGE->course->id == SITEID) || can_access_course($PAGE->course, $userid);
|
||||||
$enablerssfeeds = !empty($CFG->enablerssfeeds) && !empty($CFG->forum_enablerssfeeds);
|
$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')) {
|
if (!function_exists('rss_get_url')) {
|
||||||
require_once("$CFG->libdir/rsslib.php");
|
require_once("$CFG->libdir/rsslib.php");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue