You are here

function ad_owners_settings_submit in Advertisement 6.3

Same name and namespace in other branches
  1. 6.2 owners/ad_owners.module \ad_owners_settings_submit()
  2. 7 owners/ad_owners.module \ad_owners_settings_submit()

Submit handler for global settings of all ad types.

See also

ad_form_alter()

1 string reference to 'ad_owners_settings_submit'
ad_owners_form_alter in owners/ad_owners.module
Implementation of hook_form_alter().

File

owners/ad_owners.module, line 164
Enhances the ad module to support ad owners.

Code

function ad_owners_settings_submit($form, $form_state) {
  $roles = user_roles(TRUE);
  foreach ($roles as $rid => $role) {
    variable_set("ad_default_permissions_{$rid}_" . $form_state['values']['adtype'], $form_state['values']["default_permissions_{$rid}"]);
    unset($form_state['values']["default_permissions_{$rid}"]);
  }
  unset($form_state['values']['adtype']);
}