function shoutbox_delete_form_submit in Shoutbox 6.2
Same name and namespace in other branches
- 5 shoutbox.module \shoutbox_delete_form_submit()
- 6 shoutbox.module \shoutbox_delete_form_submit()
- 7.2 shoutbox.pages.inc \shoutbox_delete_form_submit()
- 7 shoutbox.pages.inc \shoutbox_delete_form_submit()
Handle the delete form submission.
File
- ./
shoutbox.pages.inc, line 212 - Page callbacks for the shoutbox module.
Code
function shoutbox_delete_form_submit($form, &$form_state) {
if ($form_state['clicked_button']['#value'] == t('Confirm')) {
if (is_numeric($form_state['values']['shout_id'])) {
// Load the shout
$shout = shoutbox_load($form_state['values']['shout_id']);
// Delete the shout
shoutbox_delete_shout($shout);
drupal_set_message(t('Your shout was deleted.'));
$form_state['redirect'] = '';
}
else {
return drupal_not_found();
}
}
}