MDL-80258 course: don't re-request the current category theme.
This commit is contained in:
@@ -629,10 +629,9 @@ class core_course_category implements renderable, cacheable_object, IteratorAggr
|
||||
}
|
||||
|
||||
// Delete theme usage cache if the theme has been changed.
|
||||
if (isset($data->theme)) {
|
||||
$oldcategory = $DB->get_record('course_categories', ['id' => $data->id]);
|
||||
if ($data->theme != $oldcategory->theme) {
|
||||
theme_delete_used_in_context_cache($data->theme, (string)$oldcategory->theme);
|
||||
if (isset($newcategory->theme)) {
|
||||
if ($newcategory->theme != $this->theme) {
|
||||
theme_delete_used_in_context_cache($newcategory->theme, (string) $this->theme);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user