merged from MOODLE_19_STABLE
$category->theme = $categorytheme;
if (! set_field('course_categories', 'theme', $category->theme, 'id', $category->id)) {
notify('An error occurred while setting the theme');
- } else {
- theme_setup();
}
}
}
}
+ if(! empty($CFG->allowcategorythemes) ){
+ if(isset($category->theme)){
+ // specifying theme here saves us some dbqs
+ theme_setup($category->theme);
+ }
+ }
+
/// Print headings
$numcategories = count_records("course_categories");