]> git.mjollnir.org Git - moodle.git/commitdiff
Here buggy buggy...
authordefacer <defacer>
Mon, 23 Aug 2004 13:18:39 +0000 (13:18 +0000)
committerdefacer <defacer>
Mon, 23 Aug 2004 13:18:39 +0000 (13:18 +0000)
General announcement:
If you 're running in debug mode and suddenly the HTML editor stops working
for no apparent reason, check your HTML source to find PHP notices embedded
in JS code, screwing it up and thus making it unexecutable. This has happened
to me more times than I can remember.

lib/weblib.php

index 4632822f54af4006c8889249f68f6f12e4212ec8..1cc7e43fd860a234e4e478d689f573484f057fed 100644 (file)
@@ -1170,8 +1170,8 @@ function print_header_simple($title="", $heading="", $navigation="", $focus="",
     print_header("$course->shortname: $title", "$course->fullname $heading", "$shortname $navigation", $focus, $meta,
                        $cache, $button, $menu, $usexml, $bodytags);
 }
-                       
-                       
+
+
 
 function print_footer ($course=NULL, $usercourse=NULL) {
 // Can provide a course object to make the footer contain a link to
@@ -2559,11 +2559,11 @@ function print_editor_config() {
 
     echo " }\";\n";
     echo "config.killWordOnPaste = ";
-    echo(!$CFG->editorkillword) ? "false":"true";
+    echo(empty($CFG->editorkillword)) ? "false":"true";
     echo ";\n";
     echo "config.fontname = {\n";
 
-    $fontlist = explode(";", $CFG->editorfontlist);
+    $fontlist = isset($CFG->editorfontlist) ? explode(';', $CFG->editorfontlist) : array();
     $i = 1;                     // Counter is used to get rid of the last comma.
     $count = count($fontlist);  // Otherwise IE doesn't load the editor.
 
@@ -2578,7 +2578,7 @@ function print_editor_config() {
         $i++;
     }
     echo "};";
-    if($CFG->editorspelling && !empty($CFG->aspellpath)) {
+    if(!empty($CFG->editorspelling) && !empty($CFG->aspellpath)) {
         print_speller_code($usehtmleditor=true);
     }
 }