summaryrefslogtreecommitdiff
path: root/modules/forum.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-05-29 12:58:19 +0000
committerDries Buytaert <dries@buytaert.net>2006-05-29 12:58:19 +0000
commitcf3bfe006bd9fa5aedac03fe88cb3229df4dab3e (patch)
tree5769cf88de75821c517852d9ca9fd080efd849cf /modules/forum.module
parent9b8733bca632bfbb36bfdead4004ab714da384d8 (diff)
downloadbrdo-cf3bfe006bd9fa5aedac03fe88cb3229df4dab3e.tar.gz
brdo-cf3bfe006bd9fa5aedac03fe88cb3229df4dab3e.tar.bz2
- Patch #18260 by Morbus: fixed taxonomy links.
Diffstat (limited to 'modules/forum.module')
-rw-r--r--modules/forum.module9
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/forum.module b/modules/forum.module
index 922df1eb0..4ec9da74a 100644
--- a/modules/forum.module
+++ b/modules/forum.module
@@ -638,8 +638,13 @@ function _forum_parent_select($tid, $title, $child_type) {
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']);
+ // 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']);
+ $term = taxonomy_get_term($tid);
+ if ($term->vid == _forum_get_vid()) {
+ $links[$module]['#href'] = str_replace('taxonomy/term', 'forum', $link['#href']);
+ }
}
}
}