function google_calendar_block_delete_submit in Google Calendar Block 7
Same name and namespace in other branches
- 7.2 google_calendar_block.admin.inc \google_calendar_block_delete_submit()
Form submission handler for google_calendar_block_delete().
See also
google_calendar_block_delete()
File
- ./
google_calendar_block.admin.inc, line 145 - Admin page callbacks for the Google Calendar Block module.
Code
function google_calendar_block_delete_submit($form, &$form_state) {
db_delete('google_calendar_block')
->condition('bid', $form_state['values']['bid'])
->execute();
db_delete('block')
->condition('module', 'google_calendar_block')
->condition('delta', $form_state['values']['bid'])
->execute();
db_delete('block_role')
->condition('module', 'google_calendar_block')
->condition('delta', $form_state['values']['bid'])
->execute();
drupal_set_message(t('The block %name has been removed.', array(
'%name' => $form_state['values']['info'],
)));
cache_clear_all();
$form_state['redirect'] = 'admin/structure/block';
return;
}