function bueditor_editor_import_validate in BUEditor 6.2
Same name and namespace in other branches
- 7 admin/bueditor.admin.inc \bueditor_editor_import_validate()
Editor import form validation.
1 string reference to 'bueditor_editor_import_validate'
- bueditor_editor_import_form in admin/
bueditor.admin.inc - Editor import form.
File
- admin/
bueditor.admin.inc, line 563
Code
function bueditor_editor_import_validate($form, &$form_state) {
if (!($editor = bueditor_exec_editor_code($form_state['values']['code']))) {
return form_error($form['code'], t('The editor code did not produce proper editor data.'));
}
$dirname = $form_state['values']['dirname'];
if ($dirname) {
$editor->custom_path = file_directory_path() . '/' . $dirname;
if (!file_check_directory($editor->custom_path, 1, 'dirname')) {
return FALSE;
}
}
$editor->name = $form_state['values']['name'];
$editor->eid = $editor->overwrite = empty($form_state['values']['overwrite']) ? NULL : $form_state['values']['overwrite'];
$form_state['editor'] = $editor;
}