Commit 2afd9873 authored by Steven Wittens's avatar Steven Wittens
Browse files

Search: indexing should invoke nodeapi to catch all user-visible data (e.g. file attachment names).

parent cc508ad2
...@@ -1567,12 +1567,15 @@ function node_update_index() { ...@@ -1567,12 +1567,15 @@ function node_update_index() {
// chances of this happening are very small. // chances of this happening are very small.
variable_set('node_cron_last', max($last_comment, $node->changed, $node->created)); variable_set('node_cron_last', max($last_comment, $node->changed, $node->created));
// Get node output (filtered and with module-specific fields).
if (node_hook($node, 'view')) { if (node_hook($node, 'view')) {
node_invoke($node, 'view', false, false); node_invoke($node, 'view', false, false);
} }
else { else {
$node = node_prepare($node, false); $node = node_prepare($node, false);
} }
// Allow modules to change $node->body before viewing.
node_invoke_nodeapi($node, 'view', false, false);
$text = '<h1>'. drupal_specialchars($node->title) .'</h1>'. $node->body; $text = '<h1>'. drupal_specialchars($node->title) .'</h1>'. $node->body;
......
...@@ -1567,12 +1567,15 @@ function node_update_index() { ...@@ -1567,12 +1567,15 @@ function node_update_index() {
// chances of this happening are very small. // chances of this happening are very small.
variable_set('node_cron_last', max($last_comment, $node->changed, $node->created)); variable_set('node_cron_last', max($last_comment, $node->changed, $node->created));
// Get node output (filtered and with module-specific fields).
if (node_hook($node, 'view')) { if (node_hook($node, 'view')) {
node_invoke($node, 'view', false, false); node_invoke($node, 'view', false, false);
} }
else { else {
$node = node_prepare($node, false); $node = node_prepare($node, false);
} }
// Allow modules to change $node->body before viewing.
node_invoke_nodeapi($node, 'view', false, false);
$text = '<h1>'. drupal_specialchars($node->title) .'</h1>'. $node->body; $text = '<h1>'. drupal_specialchars($node->title) .'</h1>'. $node->body;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment