function bueditor_admin_submit in BUEditor 7
Same name and namespace in other branches
- 6.2 admin/bueditor.admin.inc \bueditor_admin_submit()
- 6 bueditor.admin.inc \bueditor_admin_submit()
Admin form submission.
1 string reference to 'bueditor_admin_submit'
- bueditor_admin_form in admin/
bueditor.admin.inc - Admin form.
File
- admin/
bueditor.admin.inc, line 113
Code
function bueditor_admin_submit($form, &$form_state) {
$roles = $form_state['values']['roles'];
$roles[DRUPAL_ANONYMOUS_RID]['weight'] = 12;
$roles[DRUPAL_AUTHENTICATED_RID]['weight'] = 11;
if ($GLOBALS['user']->uid == 1 && isset($roles['u1'])) {
variable_set('bueditor_user1', $roles['u1']['editor']);
variable_set('bueditor_user1_alt', $roles['u1']['alt']);
unset($roles['u1']);
}
if (count($roles) > 3) {
uasort($roles, 'bueditor_rolesort');
}
variable_set('bueditor_roles', $roles);
drupal_set_message(t('The changes have been saved.'));
}