You are here

function biblio_delete in Bibliography Module 6

Same name and namespace in other branches
  1. 5 biblio.module \biblio_delete()
  2. 6.2 biblio.module \biblio_delete()
  3. 7 biblio.module \biblio_delete()
  4. 7.2 biblio.module \biblio_delete()

Implementation of hook_delete().

When a node is deleted, we need to clean up related tables.

File

./biblio.module, line 1728

Code

function biblio_delete($node) {
  require_once drupal_get_path('module', 'biblio') . '/biblio.contributors.inc';
  require_once drupal_get_path('module', 'biblio') . '/biblio.keywords.inc';

  //first remove data from the biblio table
  db_query('DELETE FROM {biblio} WHERE nid = %d', $node->nid);
  biblio_delete_contributors($node);
  biblio_delete_keywords($node);
}