Skip to content

Commit

Permalink
Merge branch 'MDL-75904-400' of https://github.com/paulholden/moodle
Browse files Browse the repository at this point in the history
…into MOODLE_400_STABLE
  • Loading branch information
andrewnicols committed Nov 4, 2022
2 parents d0c489d + ec0c7a2 commit ab6a1b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pagelib.php
Expand Up @@ -1792,7 +1792,7 @@ protected function resolve_theme() {
break;

case 'category':
if (!empty($CFG->allowcategorythemes) && !$hascustomdevicetheme) {
if (!empty($CFG->allowcategorythemes) && !empty($this->_course) && !$hascustomdevicetheme) {
$categories = $this->categories;
foreach ($categories as $category) {
if (!empty($category->theme)) {
Expand Down Expand Up @@ -1934,7 +1934,7 @@ protected function initialise_standard_body_classes() {
$this->add_body_class('cmid-' . $this->_cm->id);
}

if (!empty($CFG->allowcategorythemes)) {
if (!empty($CFG->allowcategorythemes) && !empty($this->_course)) {
$this->ensure_category_loaded();
foreach ($this->_categories as $catid => $notused) {
$this->add_body_class('category-' . $catid);
Expand Down

0 comments on commit ab6a1b6

Please sign in to comment.