Commit c4c5ce12 authored by Dries's avatar Dries

- Patch #31323 by Gerhard: delete extra data when a revision is deleted.

parent 7c958440
......@@ -473,6 +473,9 @@ function book_nodeapi(&$node, $op, $teaser, $page) {
}
}
break;
case 'revision delete':
db_query('DELETE FROM {book} WHERE vid = %d', $node->vid);
break;
}
}
......
......@@ -473,6 +473,9 @@ function book_nodeapi(&$node, $op, $teaser, $page) {
}
}
break;
case 'revision delete':
db_query('DELETE FROM {book} WHERE vid = %d', $node->vid);
break;
}
}
......
......@@ -71,6 +71,18 @@ function forum_perm() {
return array('create forum topics', 'edit own forum topics', 'administer forums');
}
/**
* 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
*/
......
......@@ -71,6 +71,18 @@ function forum_perm() {
return array('create forum topics', 'edit own forum topics', 'administer forums');
}
/**
* 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
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment