Allowing category themes to be reverted to "none". MDL-16152. Credit goes to Caio SBA. Merged from 19_STABLE

This commit is contained in:
stronk7
2008-08-28 23:15:37 +00:00
parent f679d73093
commit 6f8546c97d
+2 -2
View File
@@ -65,9 +65,9 @@ if ($mform->is_cancelled()){
$newcategory->description = $data->description;
$newcategory->parent = $data->parent; // if $id = 0, the new category will be a top-level category
if (!empty($data->theme) && !empty($CFG->allowcategorythemes)) {
if (isset($data->theme) && !empty($CFG->allowcategorythemes)) {
$newcategory->theme = $data->theme;
theme_setup();
theme_setup(); /// TODO: Do we really want the theme to be changed here? Doesn't look ok IMO. Eloy - 20080828
}
if (empty($category) && has_capability('moodle/category:create', $context)) { // Create a new category