From 20b57d6aac9afff127baf7667f410c9e2eee999a Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 26 Oct 2004 08:43:41 +0000 Subject: [PATCH] Fixed minor JS bug in printing out editor configuration --- lib/weblib.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/weblib.php b/lib/weblib.php index 441774f19b..cf7e6088c9 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -3413,17 +3413,17 @@ function print_side_block_end() { $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. foreach($fontlist as $fontline) { if(!empty($fontline)) { - list($fontkey, $fontvalue) = split(':', $fontline); - echo '"'. $fontkey ."\":\t'". $fontvalue ."'"; - if($i < $count) { + if ($i > 1) { echo ','."\n"; } + list($fontkey, $fontvalue) = split(':', $fontline); + echo '"'. $fontkey ."\":\t'". $fontvalue ."'"; + + $i++; } - $i++; } echo '};'; -- 2.39.5