You are here

function ad_ui_delete_form_submit in Advertisement 7.2

Submit callback for ad_ui_delete_form().

File

includes/ad_ui.inc, line 173

Code

function ad_ui_delete_form_submit($form, &$form_state) {
  $ad = $form_state['ad'];
  if (ad_delete($ad->aid)) {
    drupal_set_message(t('%title has been deleted.', array(
      '%title' => $ad->title,
    )));
    watchdog('ad', 'Deleted ad %title.', array(
      '%title' => $ad->title,
    ), WATCHDOG_NOTICE);
  }
  $form_state['redirect'] = 'admin/ad';
}