summaryrefslogtreecommitdiff
path: root/modules/forum/forum.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-08-11 21:57:40 +0000
committerDries Buytaert <dries@buytaert.net>2008-08-11 21:57:40 +0000
commitdefed7ec26a1911e2a4d3a08503f4efce5fce681 (patch)
tree6dcce9fcb8d97150852dfafba23239829588d948 /modules/forum/forum.module
parentb9eb3c896fca3c736dd19ddc50209f6c652a40b7 (diff)
downloadbrdo-defed7ec26a1911e2a4d3a08503f4efce5fce681.tar.gz
brdo-defed7ec26a1911e2a4d3a08503f4efce5fce681.tar.bz2
- Patch #197864 by vito_swat, alpritt, Gurpartap Singh et al: forum module uses hook_link_alter instead of taxonomy_term_path hook.
Diffstat (limited to 'modules/forum/forum.module')
-rw-r--r--modules/forum/forum.module18
1 files changed, 5 insertions, 13 deletions
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index c9a045596..ac245a498 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -464,19 +464,11 @@ function forum_form(&$node, $form_state) {
return $form;
}
-function forum_link_alter(&$links, $node) {
- foreach ($links as $module => $link) {
- if (strstr($module, 'taxonomy_term')) {
- // Link back to the forum and not the taxonomy term page. We'll only
- // do this if the taxonomy term in question belongs to forums.
- $tid = str_replace('taxonomy/term/', '', $link['href']);
- $vid = variable_get('forum_nav_vocabulary', '');
- $term = taxonomy_get_term($tid);
- if ($term->vid == $vid) {
- $links[$module]['href'] = str_replace('taxonomy/term', 'forum', $link['href']);
- }
- }
- }
+/**
+ * Implementation of hook_term_path().
+ */
+function forum_term_path($term) {
+ return 'forum/' . $term->tid;
}
/**