function bueditor_button_import_submit in BUEditor 6.2
Same name and namespace in other branches
- 7 admin/bueditor.admin.inc \bueditor_button_import_submit()
Button import form submission.
1 string reference to 'bueditor_button_import_submit'
- bueditor_button_import_form in admin/
bueditor.admin.inc - Button import form.
File
- admin/
bueditor.admin.inc, line 461
Code
function bueditor_button_import_submit($form, &$form_state) {
if ($file = file_save_upload('importcsv', array(
'file_validate_extensions' => array(
'csv',
),
), file_directory_temp())) {
$_SESSION['bueimport'] = $file->filepath;
}
elseif ($code = $form_state['values']['importcode']) {
if ($editor = bueditor_exec_editor_code($code)) {
$_SESSION['bueimport'] = bueditor_grab_imported_buttons($editor);
}
else {
drupal_set_message(t('The editor code did not produce proper editor data.'), 'error');
}
}
}