summaryrefslogtreecommitdiff
path: root/modules/taxonomy.module
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2006-04-27 22:20:51 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2006-04-27 22:20:51 +0000
commit954cbf7c65f70c3fe1f866198c09561253aab62a (patch)
treee468456666b1adca03744da0c85afd587ab4207f /modules/taxonomy.module
parent546f5930a471af31b7c50a52e0a5a6088acb9b0e (diff)
downloadbrdo-954cbf7c65f70c3fe1f866198c09561253aab62a.tar.gz
brdo-954cbf7c65f70c3fe1f866198c09561253aab62a.tar.bz2
#60729: Index taxonomy terms with nodes
Diffstat (limited to 'modules/taxonomy.module')
-rw-r--r--modules/taxonomy.module16
1 files changed, 15 insertions, 1 deletions
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 '<strong>('. implode(', ', $output) .')</strong>';
}
}