? interests_taxonomy.patch
Index: interests.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/interests/interests.module,v
retrieving revision 1.7.2.2
diff -u -p -r1.7.2.2 interests.module
--- interests.module	3 Jun 2009 11:24:58 -0000	1.7.2.2
+++ interests.module	4 Jan 2011 15:50:44 -0000
@@ -101,6 +101,21 @@ function interests_nodeapi(&$node, $op, 
       }
   }
 }
+
+/**
+ * Implementation of hook_taxonomy().
+ */
+function interests_taxonomy($op, $type, $array = NULL) {
+  if ($op == 'delete') {
+    if ($type == 'term') {
+      db_query("DELETE FROM {interests} WHERE tid=%d", $array['tid']);
+    }
+    else {
+      db_query("DELETE FROM {interests_vocabs} WHERE vid=%d", $array['vid']);
+    }
+  }
+}
+
 
 /**
  * Implementations of hook_form_alter().
