search_node_update_index

Versions
7
search_node_update_index($node)

Implements hook_node_update_index().

Code

modules/search/search.module, line 725

<?php
function search_node_update_index($node) {
  // Transplant links to a node into the target node.
  $result = db_query("SELECT caption FROM {search_node_links} WHERE nid = :nid", array(':nid' => $node->nid), array('target' => 'slave'));
  $output = array();
  foreach ($result as $link) {
    $output[] = $link->caption;
  }
  if (count($output)) {
    return '<a>(' . implode(', ', $output) . ')</a>';
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.