From 65b99dc85fde083cca0938634bb15c4e1779c50d Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Thu, 7 Oct 2010 00:28:20 +0000 Subject: #895014 by Damien Tournoud, chx, catch: Fixed all fields of a node type are lost on module disable. --- modules/forum/forum.install | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'modules/forum') diff --git a/modules/forum/forum.install b/modules/forum/forum.install index bc2a9b1b6..a5dbc3e10 100644 --- a/modules/forum/forum.install +++ b/modules/forum/forum.install @@ -71,30 +71,30 @@ function forum_enable() { ); $term = (object) $edit; taxonomy_term_save($term); - } - // Create the instance on the bundle. - $instance = array( - 'field_name' => 'taxonomy_' . $vocabulary->machine_name, - 'entity_type' => 'node', - 'label' => $vocabulary->name, - 'bundle' => 'forum', - 'required' => TRUE, - 'widget' => array( - 'type' => 'options_select', - ), - 'display' => array( - 'default' => array( - 'type' => 'taxonomy_term_reference_link', - 'weight' => 10, + // Create the instance on the bundle. + $instance = array( + 'field_name' => 'taxonomy_' . $vocabulary->machine_name, + 'entity_type' => 'node', + 'label' => $vocabulary->name, + 'bundle' => 'forum', + 'required' => TRUE, + 'widget' => array( + 'type' => 'options_select', ), - 'teaser' => array( - 'type' => 'taxonomy_term_reference_link', - 'weight' => 10, + 'display' => array( + 'default' => array( + 'type' => 'taxonomy_term_reference_link', + 'weight' => 10, + ), + 'teaser' => array( + 'type' => 'taxonomy_term_reference_link', + 'weight' => 10, + ), ), - ), - ); - field_create_instance($instance); + ); + field_create_instance($instance); + } // Ensure the forum node type is available. node_types_rebuild(); -- cgit v1.2.3