Index: content.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/Attic/content.module,v
retrieving revision 1.301.2.123
diff -u -p -r1.301.2.123 content.module
--- content.module	3 Jan 2011 11:03:47 -0000	1.301.2.123
+++ content.module	25 Jan 2011 22:29:43 -0000
@@ -95,7 +95,7 @@ function content_menu() {
   if (!defined('MAINTENANCE_MODE') && variable_get('content_schema_version', -1) >= 6007) {
     foreach (node_get_types() as $type) {
       $type_name = $type->type;
-      $content_type = content_types($type_name);
+      $content_type = content_types($type_name, TRUE);
       $type_url_str = $content_type['url_str'];
       $items['admin/content/node-type/'. $type_url_str .'/fields'] = array(
         'title' => 'Manage fields',
@@ -129,14 +129,16 @@ function content_menu() {
       // been added, like when a new content type is created.
       foreach ((array) $content_type['fields'] as $field) {
         $field_name = $field['field_name'];
-        $items['admin/content/node-type/'. $type_url_str .'/fields/'. $field_name] = array(
-          'title' => $field['widget']['label'],
-          'page callback' => 'drupal_get_form',
-          'page arguments' => array('content_field_edit_form', $type_name, $field_name),
-          'access arguments' => array('administer content types'),
-          'file' => 'includes/content.admin.inc',
-          'type' => MENU_LOCAL_TASK,
-        );
+        if (!empty($field['widget_active'])) {
+          $items['admin/content/node-type/'. $type_url_str .'/fields/'. $field_name] = array(
+            'title' => $field['widget']['label'],
+            'page callback' => 'drupal_get_form',
+            'page arguments' => array('content_field_edit_form', $type_name, $field_name),
+            'access arguments' => array('administer content types'),
+            'file' => 'includes/content.admin.inc',
+            'type' => MENU_LOCAL_TASK,
+          );
+        }
         $items['admin/content/node-type/'. $type_url_str .'/fields/'. $field_name .'/remove'] = array(
           'title' => 'Remove field',
           'page callback' => 'drupal_get_form',
@@ -1303,20 +1305,30 @@ function _content_field_invoke_default($
  *
  * @param $content_type_name
  *   If set, return information on just this type.
+ * @param $include_inactive
+ *   If true include information about inactive fields.
  *
  * Do some type checking and set up empty arrays for missing
  * info to avoid foreach errors elsewhere in the code.
  */
-function content_types($type_name = NULL) {
+function content_types($type_name = NULL, $include_inactive = FALSE) {
   // handle type name with either an underscore or a dash
   $type_name = !empty($type_name) ? str_replace('-', '_', $type_name) : NULL;
 
   $info = _content_type_info();
   if (isset($info['content types'])) {
     if (!isset($type_name)) {
+      if ($include_inactive) {
+        foreach (array_keys($info['content types']) as $type_name) {
+          $info['content types'][$type_name]['fields'] = array_merge($info['content types'][$type_name]['fields'], content_inactive_instances($type_name));
+        }
+      }
       return $info['content types'];
     }
     if (isset($info['content types'][$type_name])) {
+      if ($include_inactive) {      
+        $info['content types'][$type_name]['fields'] = array_merge($info['content types'][$type_name]['fields'], content_inactive_instances($type_name));
+      }
       return $info['content types'][$type_name];
     }
   }
@@ -2669,6 +2681,7 @@ function content_inactive_fields($type_n
     $inactive = array();
   }
   $all = content_field_instance_read($param, TRUE);
+
   $active = array_keys(content_fields());
   foreach ($all as $field) {
     if (!in_array($field['field_name'], $active)) {
@@ -2700,7 +2713,9 @@ function content_inactive_instances($typ
   }
   $all = content_field_instance_read($param, TRUE);
   foreach ($all as $field) {
-    $inactive[$field['type_name']][$field['field_name']] = content_field_instance_expand($field);
+    if ($field['widget_active'] == 0) {
+      $inactive[$field['type_name']][$field['field_name']] = content_field_instance_expand($field);
+    }
   }
   if (!empty($type_name)) {
     return $inactive[$type_name];
Index: includes/content.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/includes/Attic/content.admin.inc,v
retrieving revision 1.181.2.76
diff -u -p -r1.181.2.76 content.admin.inc
--- includes/content.admin.inc	2 Nov 2009 21:21:24 -0000	1.181.2.76
+++ includes/content.admin.inc	25 Jan 2011 22:29:44 -0000
@@ -138,7 +138,7 @@ function content_field_overview_form(&$f
   }
 
   // Gather type information.
-  $type = content_types($type_name);
+  $type = content_types($type_name, TRUE);
   $fields = $type['fields'];
   $field_types = _content_field_types();
 
@@ -188,6 +188,10 @@ function content_field_overview_form(&$f
       $form[$name]['remove'] = array();
       $form[$name]['#disabled_row'] = TRUE;
     }
+    elseif (empty($field['widget_active'])) {
+      $form[$name]['configure'] = array('#value' => t('Disabled'));
+      $form[$name]['#disabled_row'] = TRUE;
+    }
     $form['#field_rows'][] = $name;
     $weights[] = $weight;
   }
@@ -893,7 +897,7 @@ function content_field_basic_form_submit
  * Menu callback; present a form for removing a field from a content type.
  */
 function content_field_remove_form(&$form_state, $type_name, $field_name) {
-  $type = content_types($type_name);
+  $type = content_types($type_name, TRUE);
   $field = $type['fields'][$field_name];
 
   $form = array();
@@ -929,7 +933,7 @@ function content_field_remove_form_submi
   module_load_include('inc', 'content', 'includes/content.crud');
   $form_values = $form_state['values'];
 
-  $type = content_types($form_values['type_name']);
+  $type = content_types($form_values['type_name'], TRUE);
   $field = $type['fields'][$form_values['field_name']];
   if ($field['locked']) {
     return;
Index: includes/content.crud.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/includes/Attic/content.crud.inc,v
retrieving revision 1.76.2.17
diff -u -p -r1.76.2.17 content.crud.inc
--- includes/content.crud.inc	14 Jul 2009 22:17:05 -0000	1.76.2.17
+++ includes/content.crud.inc	25 Jan 2011 22:29:44 -0000
@@ -547,8 +547,7 @@ function content_field_instance_delete($
   include_once('./'. drupal_get_path('module', 'content') .'/includes/content.admin.inc');
 
   // Get the previous field value.
-  $field = array_pop(content_field_instance_read(array('field_name' => $field_name, 'type_name' => $type_name)));
-
+  $field = array_pop(content_field_instance_read(array('field_name' => $field_name, 'type_name' => $type_name), TRUE));
   // Invoke hook_content_fieldapi().
   module_invoke_all('content_fieldapi', 'delete instance', $field);
 
