MDL-75904 admin: ignore $CFG->allowcategorythemes during installation.
This commit is contained in:
+2
-2
@@ -1644,7 +1644,7 @@ class moodle_page {
|
||||
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)) {
|
||||
@@ -1786,7 +1786,7 @@ class moodle_page {
|
||||
$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);
|
||||
|
||||
Reference in New Issue
Block a user