function ad_channel_admin_confirm_delete_channel_submit in Advertisement 6.2
Same name and namespace in other branches
- 5.2 channel/ad_channel.module \ad_channel_admin_confirm_delete_channel_submit()
- 6.3 channel/ad_channel.module \ad_channel_admin_confirm_delete_channel_submit()
- 7 channel/ad_channel.module \ad_channel_admin_confirm_delete_channel_submit()
Delete a channel.
File
- channel/
ad_channel.module, line 1295 - Ad Channel module.
Code
function ad_channel_admin_confirm_delete_channel_submit($form, &$form_state) {
$channel = _ad_channel_get_channels($form_state['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');
}