diff options
Diffstat (limited to 'modules/forum')
-rw-r--r-- | modules/forum/forum.install | 1 | ||||
-rw-r--r-- | modules/forum/forum.module | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/modules/forum/forum.install b/modules/forum/forum.install index a21244947..1f4c72ba2 100644 --- a/modules/forum/forum.install +++ b/modules/forum/forum.install @@ -43,6 +43,7 @@ function forum_enable() { $instance = array( 'field_name' => 'taxonomy_' . $vocabulary->machine_name, + 'object_type' => 'node', 'label' => $vocabulary->name, 'bundle' => 'forum', 'widget' => array( diff --git a/modules/forum/forum.module b/modules/forum/forum.module index 6a62bdfe8..da83c86f6 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -159,7 +159,7 @@ function forum_init() { */ function _forum_node_check_node_type($node) { // Fetch information about the forum field. - $field = field_info_instance('taxonomy_forums', $node->type); + $field = field_info_instance('node', 'taxonomy_forums', $node->type); return is_array($field); } @@ -850,7 +850,7 @@ function template_preprocess_forums(&$variables) { // Loop through all bundles for forum taxonomy vocabulary field. $field = field_info_field('taxonomy_' . $vocabulary->machine_name); - foreach ($field['bundles'] as $type) { + foreach ($field['bundles']['node'] as $type) { // Check if the current user has the 'create' permission for this node type. if (node_access('create', $type)) { // Fetch the "General" name of the content type; |