From 36798745fb83a3d6289d8dc820882f656ab2572b Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Wed, 12 May 2010 09:44:45 +0000 Subject: [PATCH] user MDL-22382 Fixed incorrect use of get_list_of_themes in editlib.php --- user/editlib.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/user/editlib.php b/user/editlib.php index 3acba16d8ee..d3f38424d2d 100644 --- a/user/editlib.php +++ b/user/editlib.php @@ -223,7 +223,12 @@ function useredit_shared_definition(&$mform, $editoroptions = null) { if (!empty($CFG->allowuserthemes)) { $choices = array(); $choices[''] = get_string('default'); - $choices += get_list_of_themes(); + $themes = get_list_of_themes(); + foreach ($themes as $key=>$theme) { + if (empty($theme->hidefromselector)) { + $choices[$key] = $theme->name; + } + } $mform->addElement('select', 'theme', get_string('preferredtheme'), $choices); $mform->setAdvanced('theme'); }