profile_admin_overview_submit
function profile_admin_overview_submit
profile_admin_overview_submit($form, &$form_state)
Submit handler to update changed profile field weights and categories.
See also
File
- modules/profile/profile.admin.inc, line 82
- Administrative page callbacks for the profile module.
Code
function profile_admin_overview_submit($form, &$form_state) { foreach (element_children($form_state['values']) as $fid) { if (is_numeric($fid)) { $weight = $form_state['values'][$fid]['weight']; $category = $form_state['values'][$fid]['category']; if ($weight != $form[$fid]['weight']['#default_value'] || $category != $form[$fid]['category']['#default_value']) { db_update('profile_field') ->fields(array( 'weight' => $weight, 'category' => $category, )) ->condition('fid', $fid) ->execute(); } } } drupal_set_message(t('Profile fields have been updated.')); cache_clear_all(); menu_rebuild(); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!profile!profile.admin.inc/function/profile_admin_overview_submit/7.x