You are here

function avatar_selection_edit_update_form_submit in Avatar Selection 7

Same name and namespace in other branches
  1. 6 avatar_selection.admin.inc \avatar_selection_edit_update_form_submit()

Submit the image list form in the Avatar Selection - 'Manage Avatars' page.

Function called when the Update button is pressed.

Parameters

$form: General variable used in drupal, defining the structure & the fields of a form.

&$form_state: General reference, used to control the processing of the form.

1 string reference to 'avatar_selection_edit_update_form_submit'
avatar_selection_edit_form in ./avatar_selection.admin.inc
Create the form structure for listing the avatars and managing them in the 'Manage Avatars' tab under the Avatar Selection administration page.

File

./avatar_selection.admin.inc, line 727
Administrative page callbacks for the avatar_selection module.

Code

function avatar_selection_edit_update_form_submit($form, &$form_state) {
  $og = array();
  $access = array_keys(array_filter($form_state['values']['access']));
  if (module_exists('og')) {
    $og = array_keys(array_filter($form_state['values']['og_access']));
  }
  $file = $form_state['values']['select_avatar'];
  $name = $form_state['values']['avatar_name'];
  $weight = $form_state['values']['avatar_weight'];
  $aid = $form_state['values']['aid'];
  _avatar_selection_save_avatar_info($aid, $file, $name, $access, $og, $weight);
  drupal_set_message(t('Image updated.'));
}