if (node_access('delete', $node)) { db_query('DELETE FROM {node} WHERE nid = %d', $node->nid); db_query('DELETE FROM {node_revisions} WHERE nid = %d', $node->nid);
drupal_set_message(t('@type %title has been deleted.', array('@type' => node_get_types('name', $node), '%title' => $node->title))); }
<?php /** * Implements validation from the Form API. * * @param $form * A structured array containing the elements and properties of the form. * @param $form_state * An array that stores information about the form's current state