book_update

  1. drupal
    1. 4.7
Versions
4.7 book_update($node)

Implementation of hook_update().

Code

modules/book.module, line 190

<?php
function book_update($node) {
  if ($node->revision) {
    db_query("INSERT INTO {book} (nid, vid, parent, weight) VALUES (%d, %d, %d, %d)", $node->nid, $node->vid, $node->parent, $node->weight);
  }
  else {
    db_query("UPDATE {book} SET parent = %d, weight = %d WHERE vid = %d", $node->parent, $node->weight, $node->vid);
  }
}
?>