function forum_update in Drupal 4
Same name and namespace in other branches
- 5 modules/forum/forum.module \forum_update()
Implementation of hook_update().
File
- modules/
forum.module, line 375 - Enable threaded discussions about general topics.
Code
function forum_update($node) {
if ($node->revision) {
db_query("INSERT INTO {forum} (nid, vid, tid) VALUES (%d, %d, %d)", $node->nid, $node->vid, $node->tid);
}
else {
db_query('UPDATE {forum} SET tid = %d WHERE vid = %d', $node->tid, $node->vid);
}
}