You are here

function sbp_nodes_nodeapi in Search by Page 6

Implementation of hook_nodeapi().

When a node is updated, sets it for reindexing at the next cron run. When it's deleted, remove it from the search index.

File

./sbp_nodes.module, line 244
Module file for Search by Page Nodes, a sub-module for Search by Page.

Code

function sbp_nodes_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
  switch ($op) {
    case 'update':
      search_by_page_force_reindex('sbp_nodes', $node->nid);
      break;
    case 'delete':
      search_by_page_force_remove('sbp_nodes', $node->nid);
      break;
  }
}