You are here

function ad_multiple_delete_confirm_submit in Advertisement 6.3

Same name and namespace in other branches
  1. 5.2 ad.module \ad_multiple_delete_confirm_submit()
  2. 5 ad.module \ad_multiple_delete_confirm_submit()
  3. 6 ad.admin.inc \ad_multiple_delete_confirm_submit()
  4. 6.2 ad.admin.inc \ad_multiple_delete_confirm_submit()
  5. 7 ad.admin.inc \ad_multiple_delete_confirm_submit()

Perform the actual ad deletions.

File

./ad.admin.inc, line 157
Advertisement admin pages and functions.

Code

function ad_multiple_delete_confirm_submit($form, &$form_state) {
  if ($form_state['values']['confirm']) {
    foreach ($form_state['values']['ads'] as $aid => $value) {
      node_delete($aid);
    }
    drupal_set_message(t('The ads have been deleted.'));
  }
  $form_state['redirect'] = 'admin/content/ad';
}