Allowing category themes to be reverted to "none". MDL-16152. Credit goes to Caio...
authorstronk7 <stronk7>
Thu, 28 Aug 2008 23:15:37 +0000 (23:15 +0000)
committerstronk7 <stronk7>
Thu, 28 Aug 2008 23:15:37 +0000 (23:15 +0000)
course/editcategory.php

index 3288f45857cf19519ce7e368ec695672c50380fb..70977ad8b4728a88d821c06d570ce10ddf09cb64 100644 (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