MDL-83786 navigation: Correct incorrect paren in navfilter

This condition was checking whether navgfilter was true, and the
stringfilter was also true.

In most cases the condition will have actually worked correctly, albeit
by fluke. For users upgrading or otherwise missing the navfilter
configuration this condition led to warnings.
This commit is contained in:
Andrew Nicols
2024-11-22 08:36:17 +08:00
parent 269a8a8a1b
commit 9781d5f392
+2 -2
View File
@@ -3488,7 +3488,7 @@ EOD;
}
// If filtering of the primary custom menu is enabled, apply only the string filters.
if (!empty($CFG->navfilter && !empty($CFG->stringfilters))) {
if (!empty($CFG->navfilter) && !empty($CFG->stringfilters)) {
// Apply filters that are enabled for Content and Headings.
$filtermanager = \filter_manager::instance();
$custommenuitems = $filtermanager->filter_string($custommenuitems, \context_system::instance());
@@ -3511,7 +3511,7 @@ EOD;
}
// If filtering of the primary custom menu is enabled, apply only the string filters.
if (!empty($CFG->navfilter && !empty($CFG->stringfilters))) {
if (!empty($CFG->navfilter) && !empty($CFG->stringfilters)) {
// Apply filters that are enabled for Content and Headings.
$filtermanager = \filter_manager::instance();
$custommenuitems = $filtermanager->filter_string($custommenuitems, \context_system::instance());