summaryrefslogtreecommitdiff
path: root/modules/forum/forum.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-12-05 16:07:18 +0000
committerDries Buytaert <dries@buytaert.net>2005-12-05 16:07:18 +0000
commitc4c5ce122d1739abaf398d2a8c8d4ef825cd61a0 (patch)
treeddd5dd52ec80b722196bcdb151e8118cbe95ad1d /modules/forum/forum.module
parent7c958440ff86d4ccfc05c93cd4c8dac0a1c5ede7 (diff)
downloadbrdo-c4c5ce122d1739abaf398d2a8c8d4ef825cd61a0.tar.gz
brdo-c4c5ce122d1739abaf398d2a8c8d4ef825cd61a0.tar.bz2
- Patch #31323 by Gerhard: delete extra data when a revision is deleted.
Diffstat (limited to 'modules/forum/forum.module')
-rw-r--r--modules/forum/forum.module12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index 7e12b8c6b..2790f5be7 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -72,6 +72,18 @@ function forum_perm() {
}
/**
+ * Implementation of hook_nodeapi().
+ */
+function forum_nodeapi(&$node, $op, $teaser, $page) {
+ switch ($op) {
+ case 'revision delete':
+ db_query('DELETE FROM {forum} WHERE vid = %d', $node->vid);
+ break;
+ }
+}
+
+
+/**
* Administration page which allows maintaining forums
*/
function forum_admin() {