From 954cbf7c65f70c3fe1f866198c09561253aab62a Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Thu, 27 Apr 2006 22:20:51 +0000 Subject: #60729: Index taxonomy terms with nodes --- modules/taxonomy.module | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'modules/taxonomy.module') diff --git a/modules/taxonomy.module b/modules/taxonomy.module index dedab9429..149f8bf84 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -1182,7 +1182,21 @@ function taxonomy_nodeapi($node, $op, $arg = 0) { break; case 'rss item': return taxonomy_rss_item($node); - break; + case 'update index': + return taxonomy_node_update_index($node); + } +} + +/** + * Implementation of hook_nodeapi('update_index'). + */ +function taxonomy_node_update_index(&$node) { + $output = array(); + foreach ($node->taxonomy as $term) { + $output[] = $term->name; + } + if (count($output)) { + return '('. implode(', ', $output) .')'; } } -- cgit v1.2.3