From 629b5885f7662a7eddf61ae1ca4c2ac23b803e88 Mon Sep 17 00:00:00 2001 From: defacer Date: Mon, 23 Aug 2004 13:18:39 +0000 Subject: [PATCH] Here buggy buggy... 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 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/weblib.php b/lib/weblib.php index 4632822f54..1cc7e43fd8 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -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); } } -- 2.39.5