1 book.pages.inc book_remove_form_submit($form, &$form_state)

Form submission handler for book_remove_form().

File

core/modules/book/book.pages.inc, line 51
User page callbacks for the book module.

Code

function book_remove_form_submit($form, &$form_state) {
  $node = $form['#node'];
  if (_book_node_is_removable($node)) {
    menu_link_delete($node->book['mlid']);
    db_delete('book')
      ->condition('nid', $node->nid)
      ->execute();
    cache_clear_all($node->nid, 'cache_entity_node');
    backdrop_set_message(t('The post has been removed from the book.'));
  }
  $form_state['redirect'] = 'node/' . $node->nid;
}