function bueditor_button_import_submit in BUEditor 7
Same name and namespace in other branches
- 6.2 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 545
Code
function bueditor_button_import_submit($form, &$form_state) {
if ($file = file_save_upload('importcsv', array(
'file_validate_extensions' => array(
'csv',
),
), 'temporary://')) {
$_SESSION['bueimport'] = drupal_realpath($file->uri);
}
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');
}
}
}