function ad_admin_group_form_submit in Advertisement 5
Same name and namespace in other branches
- 5.2 ad.module \ad_admin_group_form_submit()
- 6.3 ad.admin.inc \ad_admin_group_form_submit()
- 6 ad.admin.inc \ad_admin_group_form_submit()
- 6.2 ad.admin.inc \ad_admin_group_form_submit()
- 7 ad.admin.inc \ad_admin_group_form_submit()
Save a newly created ad group.
File
- ./
ad.module, line 2784 - An advertising system for Drupal powered websites.
Code
function ad_admin_group_form_submit($form_id, $form_values) {
$status = taxonomy_save_term($form_values);
switch ($status) {
case SAVED_NEW:
$groups = variable_get('ad_groups', array());
$groups[] = $form_values['tid'];
variable_set('ad_groups', $groups);
drupal_set_message(t('Created new ad group %term.', array(
'%term' => $form_values['name'],
)));
break;
case SAVED_UPDATED:
drupal_set_message(t('The ad group %term has been updated.', array(
'%term' => $form_values['name'],
)));
}
return 'admin/content/ad/groups';
}