You are here

function ad_channel_admin_confirm_delete_channel_submit in Advertisement 5.2

Same name and namespace in other branches
  1. 6.3 channel/ad_channel.module \ad_channel_admin_confirm_delete_channel_submit()
  2. 6.2 channel/ad_channel.module \ad_channel_admin_confirm_delete_channel_submit()
  3. 7 channel/ad_channel.module \ad_channel_admin_confirm_delete_channel_submit()

Delete a channel.

File

channel/ad_channel.module, line 794
Ad Channel

Code

function ad_channel_admin_confirm_delete_channel_submit($form_id, $form_values) {
  $channel = _ad_channel_get_channels($form_values['chid']);
  if ($channel->chid) {
    db_query('DELETE FROM {ad_channel} WHERE chid = %d', $channel->chid);
    drupal_set_message(t('The %name channel has been deleted.', array(
      '%name' => $channel->name,
    )));
  }
  drupal_goto('admin/content/ad/channel');
}