function bueditor_admin_submit in BUEditor 6
Same name and namespace in other branches
- 6.2 admin/bueditor.admin.inc \bueditor_admin_submit()
- 7 admin/bueditor.admin.inc \bueditor_admin_submit()
Admin form submit.
1 string reference to 'bueditor_admin_submit'
- bueditor_admin_form in ./
bueditor.admin.inc - Admin form.
File
- ./
bueditor.admin.inc, line 75
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('Changes have been saved.'));
}