]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-12697 - Category Themes do not appear when editing off
authorpoltawski <poltawski>
Tue, 25 Dec 2007 01:00:31 +0000 (01:00 +0000)
committerpoltawski <poltawski>
Tue, 25 Dec 2007 01:00:31 +0000 (01:00 +0000)
merged from MOODLE_19_STABLE

course/category.php

index 48fcd7a84a70c69aa2319d57786a8242081cd43e..ff79afcbc04f6b55efeee9a20e93890287637249 100644 (file)
@@ -67,8 +67,6 @@
             $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");