You are here

function biblio_node_update in Bibliography Module 7.2

Same name and namespace in other branches
  1. 7 biblio.module \biblio_node_update()

Implements hook_node_update().

File

./biblio.module, line 1047

Code

function biblio_node_update($node) {
  if ($node->type == 'biblio') {
    if (variable_get('biblio_index', 0)) {

      // _node_index_node performs a node_load without resetting the node_load cache,
      // so it would index the old version. We reset the cache here.
      // Don't assign node_load to $node because node_load resets e.g. the menus mlid etc.
      $mynode = node_load($node->nid, NULL, TRUE);
      _node_index_node($mynode);
      search_update_totals();
    }
  }
}