Permalink
Browse files

Check if html editor is enabled before checking htmleditor setting fr…

…om screen.

Removes notice if editor not in use (therefore field  was not displayed)
  • Loading branch information...
1 parent d0491a1 commit 1122563591c16041673918fc0da5d99f52fcfdaa thepurpleblob committed Sep 13, 2005
Showing with 6 additions and 1 deletion.
  1. +6 −1 user/edit.php
View
@@ -96,7 +96,12 @@
$usernew->mailformat = clean_param($usernew->mailformat, PARAM_INT);
$usernew->maildigest = clean_param($usernew->maildigest, PARAM_INT);
$usernew->autosubscribe = clean_param($usernew->autosubscribe, PARAM_INT);
- $usernew->htmleditor = clean_param($usernew->htmleditor, PARAM_INT);
+ if (!empty($CFG->htmleditor)) {
+ $usernew->htmleditor = clean_param($usernew->htmleditor, PARAM_INT);
+ }
+ else {
+ unset( $usernew->htmleditor );
+ }
$usernew->emailstop = clean_param($usernew->emailstop, PARAM_INT);
if (isset($usernew->timezone)) {

0 comments on commit 1122563

Please sign in to comment.