function forum_update in Drupal 5
Same name and namespace in other branches
- 4 modules/forum.module \forum_update()
Implementation of hook_update().
File
- modules/
forum/ forum.module, line 373 - 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);
}
}