]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-16626 simplified editor selection, going to change it a bit more later
authorskodak <skodak>
Tue, 23 Sep 2008 15:19:21 +0000 (15:19 +0000)
committerskodak <skodak>
Tue, 23 Sep 2008 15:19:21 +0000 (15:19 +0000)
admin/settings/appearance.php
lib/moodlelib.php

index 37123c4ac69a615ea8e7fbd2b647b226b313fd04..f856a5298497c0d9028b282247795267143ae085 100644 (file)
@@ -51,11 +51,8 @@ if ($hassiteconfig) { // speedup for non-admins, add all caps used on this page
 
     $temp = new admin_settingpage('htmleditorsettings', get_string('htmleditorsettings', 'admin'));
 
-    $htmleditors = array();
-    foreach (get_available_html_editors() as $editor) {
-        //$htmleditors[$editor] = get_string($editor, 'admin');
-        $htmleditors[$editor] = $editor;
-    }
+    $htmleditors = get_available_html_editors();
+
     $temp->add(new admin_setting_configselect('defaulthtmleditor', get_string('defaulthtmleditor', 'admin'), null, 'tinymce', $htmleditors));
     $temp->add(new admin_setting_configcheckbox('htmleditor', get_string('usehtmleditor', 'admin'), get_string('confightmleditor','admin'), 1));
     $temp->add(new admin_setting_emoticons());
index 08d8defaacb67a58a4279245cbb76b62c6fcf182..763adb302efb62ceba662df765deb7d2acc59e31 100644 (file)
@@ -6356,27 +6356,7 @@ function ini_get_bool($ini_get_arg) {
  * Get the list of available HTML editors
  */
 function get_available_html_editors() {
-    global $CFG;
-    static $editors = null;
-
-    if ($editors != null) {
-        return $editors;
-    }
-
-    $editors = array();
-
-    $dir = opendir($CFG->libdir .'/editor');
-    while (($file = readdir($dir)) !== false) {
-        if ($file != '.' and $file != '..') {
-            $path_file = $CFG->libdir ."/editor/{$file}";
-            if (is_dir($path_file) and file_exists($path_file .'.js.php')) {
-                $editors[] = $file;
-            }
-        }
-    }
-    closedir($dir);
-
-    return $editors;
+    return array('tinymce'=>'TinyMCE');
 }
 
 /**