diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-07 00:28:20 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-07 00:28:20 +0000 |
commit | 65b99dc85fde083cca0938634bb15c4e1779c50d (patch) | |
tree | e6313de07afaf6962b0cfe4f0c637a3845e6d06b /modules/forum | |
parent | 466c8ff543ec24e224d1c03a856d6e89459e4243 (diff) | |
download | brdo-65b99dc85fde083cca0938634bb15c4e1779c50d.tar.gz brdo-65b99dc85fde083cca0938634bb15c4e1779c50d.tar.bz2 |
#895014 by Damien Tournoud, chx, catch: Fixed all fields of a node type are lost on module disable.
Diffstat (limited to 'modules/forum')
-rw-r--r-- | modules/forum/forum.install | 42 |
1 files changed, 21 insertions, 21 deletions
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(); |