Misc fixes
This commit is contained in:
@@ -41,9 +41,12 @@ class data_field_menu extends data_field_base {
|
||||
|
||||
$str = '<div title="'.$this->field->description.'">';
|
||||
|
||||
foreach (explode("\n",$this->field->param1) as $option) {
|
||||
$rawoptions = explode("\n",$this->field->param1);
|
||||
foreach ($rawoptions as $option) {
|
||||
$option = trim($option);
|
||||
$options[$option] = $option;
|
||||
if ($option) {
|
||||
$options[$option] = $option;
|
||||
}
|
||||
}
|
||||
|
||||
$str .= choose_from_menu($options, 'field_'.$this->field->id, $content,
|
||||
|
||||
@@ -92,7 +92,7 @@ class data_field_textarea extends data_field_base {
|
||||
if (!empty($names[2])) {
|
||||
$content->$names[2] = clean_param($value, PARAM_NOTAGS); // content[1-4]
|
||||
} else {
|
||||
$content->content = clean_param($value, PARAM_NOTAGS);
|
||||
$content->content = clean_param($value, PARAM_CLEAN);
|
||||
}
|
||||
|
||||
if ($oldcontent = get_record('data_content','fieldid', $this->field->id, 'recordid', $recordid)) {
|
||||
|
||||
Reference in New Issue
Block a user