? node_example/node_example-fields_uninstall-1015846-1.patch
? node_example/node_example-fields_uninstall-1015846-5.patch
Index: node_example/node_example.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/examples/node_example/node_example.install,v
retrieving revision 1.11
diff -u -p -r1.11 node_example.install
--- node_example/node_example.install	15 Oct 2010 14:57:08 -0000	1.11
+++ node_example/node_example.install	5 Jan 2011 17:44:23 -0000
@@ -193,16 +193,9 @@ function node_example_uninstall() {
   // http://api.drupal.org/api/function/node_delete_multiple/7
   node_delete_multiple($nids);
 
-  // Loop over each of the fields defined by this module and delete
-  // all instances of the field, their data, and the field itself.
-  // http://api.drupal.org/api/function/field_delete_field/7
-  foreach (array_keys(_node_example_installed_fields()) as $field) {
-    field_delete_field($field);
-  }
-
-  // Loop over any remaining field instances attached to the node_example
-  // content type (such as the body field) and delete them individually.
-  // http://api.drupal.org/api/function/field_delete_field/7
+  // Loop over field instances attached to the node_example node type and
+  // delete them individually.
+  // http://api.drupal.org/api/function/field_delete_instance/7
   $instances = field_info_instances('node', 'node_example');
   foreach ($instances as $instance_name => $instance) {
     field_delete_instance($instance);
