From: moodler Date: Mon, 25 Sep 2006 07:55:10 +0000 (+0000) Subject: Fix the editor and the surrounding table for settings X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=fa040029f060bb52220dcfcffc9eccbbd3f8814f;p=moodle.git Fix the editor and the surrounding table for settings --- diff --git a/admin/settings.php b/admin/settings.php index 9d9098c25c..b17bbf5619 100644 --- a/admin/settings.php +++ b/admin/settings.php @@ -110,12 +110,11 @@ echo ''; echo ''; echo ''; print_heading($root->visiblename); -print_simple_box_start('','100%','',5,'generalbox',''); echo $root->output_html(); echo '
'; -print_simple_box_end(); + echo ''; if (!empty($SITE->fullname)) { @@ -125,6 +124,10 @@ if (!empty($SITE->fullname)) { echo ''; } +if (!empty($CFG->adminusehtmleditor)) { + use_html_editor(); +} + print_footer(); ?> diff --git a/lib/adminlib.php b/lib/adminlib.php index d1deca9d32..53d1d3d30a 100644 --- a/lib/adminlib.php +++ b/lib/adminlib.php @@ -1702,22 +1702,17 @@ class admin_setting_special_frontpagedesc extends admin_setting { function output_html() { + global $CFG; + if ($this->get_setting() === NULL) { $currentsetting = $this->defaultsetting; } else { $currentsetting = $this->get_setting(); } - $usehtmleditor = can_use_html_editor(); + $CFG->adminusehtmleditor = can_use_html_editor(); - ob_start(); // double-check the number of columns below... might overrun some screen resolutions - print_textarea($usehtmleditor, 15, 60, 0, 0, 's_' . $this->name, $currentsetting); - - if ($usehtmleditor) { - use_html_editor(); - } - $return = ob_get_contents(); - ob_end_clean(); + $return = print_textarea($CFG->adminusehtmleditor, 15, 60, 0, 0, 's_' . $this->name, $currentsetting, 0, true); return format_admin_setting('frontpagedesc', $this->name, $this->visiblename, $return, $this->description); }