From e0cd4f685c169bb7ad34528af651294a5c5fec67 Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Thu, 18 Mar 2010 06:02:41 +0000 Subject: [PATCH] theme MDL-20204 Fixed regression with theme selector in category edit form --- course/editcategory_form.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/course/editcategory_form.php b/course/editcategory_form.php index a5b9cdd09b6..e5f3b7559fc 100644 --- a/course/editcategory_form.php +++ b/course/editcategory_form.php @@ -28,9 +28,11 @@ class editcategory_form extends moodleform { $mform->addElement('editor', 'description_editor', get_string('description'), null, $editoroptions); $mform->setType('description_editor', PARAM_RAW); if (!empty($CFG->allowcategorythemes)) { - $themes=array(); - $themes[''] = get_string('forceno'); - $themes += get_list_of_themes(); + $themes = array(''=>get_string('forceno')); + $allthemes = get_list_of_themes(); + foreach ($allthemes as $key=>$theme) { + $themes[$key] = $theme->name; + } $mform->addElement('select', 'theme', get_string('forcetheme'), $themes); } $mform->setHelpButton('description_editor', array('writing', 'richtext2'), false, 'editorhelpbutton');