You are here

function apachesolr_nodeaccess_nodeapi in Apache Solr Search 5.2

Same name and namespace in other branches
  1. 5 contrib/apachesolr_nodeaccess/apachesolr_nodeaccess.module \apachesolr_nodeaccess_nodeapi()
  2. 6 contrib/apachesolr_nodeaccess/apachesolr_nodeaccess.module \apachesolr_nodeaccess_nodeapi()
  3. 6.2 contrib/apachesolr_nodeaccess/apachesolr_nodeaccess.module \apachesolr_nodeaccess_nodeapi()

Implementation of hook_nodeapi().

Listen to this hook to find out when a node is being saved.

File

contrib/apachesolr_nodeaccess/apachesolr_nodeaccess.module, line 101

Code

function apachesolr_nodeaccess_nodeapi(&$node, $op) {
  switch ($op) {
    case 'insert':
    case 'update':

      // hook_nodeapi() is called before hook_node_access_records() in node_save().
      $node->apachesolr_nodeaccess_ignore = 1;
      break;
  }
}