function block_revisions_delete_revisions in Block Revisions 6
Same name and namespace in other branches
- 7 block_revisions.module \block_revisions_delete_revisions()
1 string reference to 'block_revisions_delete_revisions'
- block_revisions_form_block_box_delete_alter in ./
block_revisions.module - Implementation of hook_form_FORM_ID_alter().
File
- ./
block_revisions.module, line 192
Code
function block_revisions_delete_revisions($form, &$form_state) {
$delta = $form_state['values']['bid'];
db_query("DELETE FROM {boxes_revisions} WHERE bid = %d", $delta);
$title = db_result(db_query("SELECT info FROM {boxes} WHERE bid = %d", $delta));
watchdog('content', "Deleted all remaining revisions for custom block '%title'.", array(
'%title' => $title,
));
drupal_set_message(t("All revisions for custom block '%title' have been deleted.", array(
'%title' => $title,
)));
}