| Versions | |
|---|---|
| 4.7 – 5 | forum_update($node) |
Implementation of hook_update().
modules/
<?php
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);
}
}
?>