From 1b291a2917a1c18194c54fce8bf0fd895db98019 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 18 May 2006 14:58:57 +0000 Subject: - Patch #18260 by Ber, m3averck et al: allow overriding of links returned by modules --- modules/forum/forum.module | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'modules/forum/forum.module') diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 6a27f6855..922df1eb0 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -635,8 +635,13 @@ function _forum_parent_select($tid, $title, $child_type) { return array('#type' => 'select', '#title' => $title, '#default_value' => $parent, '#options' => $options, '#description' => $description, '#required' => TRUE); } -function forum_term_path($term) { - return 'forum/'. $term->tid; +function forum_link_alter(&$node, &$links) { + foreach ($links AS $module => $link) { + if (strstr($module, 'taxonomy_term')) { + // Link back to the forum and not the taxonomy term page + $links[$module]['#href'] = str_replace('taxonomy/term', 'forum', $link['#href']); + } + } } /** -- cgit v1.2.3