From: skodak Date: Sat, 15 Mar 2008 16:37:41 +0000 (+0000) Subject: MDL-13893 fixed hiding of editor buttons, added labels there too; merged from MOODLE_... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5ac776acda490296c65a8a6b7318d2c0e17a751e;p=moodle.git MDL-13893 fixed hiding of editor buttons, added labels there too; merged from MOODLE_19_STABLE --- diff --git a/lib/adminlib.php b/lib/adminlib.php index 39f1dba823..857873b107 100644 --- a/lib/adminlib.php +++ b/lib/adminlib.php @@ -3012,7 +3012,7 @@ class admin_setting_special_editorhidebuttons extends admin_setting { if ($result === '') { return array(); } - return explode(',', $result); + return explode(' ', $result); } function write_setting($data) { @@ -3023,7 +3023,7 @@ class admin_setting_special_editorhidebuttons extends admin_setting { $result = array(); foreach ($data as $key => $value) { - if (!in_array($key, array_keys($this->items))) { + if (!isset($this->items[$key])) { return get_string('errorsetting', 'admin'); } if ($value == '1') { @@ -3051,8 +3051,10 @@ class admin_setting_special_editorhidebuttons extends admin_setting { $return .= ''; } + $return .= ''; $count++; if ($count % 15 != 0) { $return .= '

';