### Eclipse Workspace Patch 1.0
#P CCK 6.x
Index: modules/optionwidgets/optionwidgets.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/modules/optionwidgets/optionwidgets.module,v
retrieving revision 1.69.2.13
diff -u -r1.69.2.13 optionwidgets.module
--- modules/optionwidgets/optionwidgets.module	5 Sep 2008 15:00:25 -0000	1.69.2.13
+++ modules/optionwidgets/optionwidgets.module	6 Sep 2008 15:49:47 -0000
@@ -11,7 +11,7 @@
  */
 function optionwidgets_form_alter(&$form, $form_state, $form_id) {
   // Provide additional help for the field settings form.
-  if ($form_id == '_content_admin_field' && isset($form['widget'])) {
+  if ($form_id == 'content_field_edit_form' && isset($form['widget'])) {
     $widget_type = $form['main']['widget_type']['#default_value'];
     $field_type = $form['main']['type']['#value'];
 
Index: modules/fieldgroup/fieldgroup.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/modules/fieldgroup/fieldgroup.module,v
retrieving revision 1.79.2.17
diff -u -r1.79.2.17 fieldgroup.module
--- modules/fieldgroup/fieldgroup.module	1 Sep 2008 21:59:19 -0000	1.79.2.17
+++ modules/fieldgroup/fieldgroup.module	6 Sep 2008 15:49:47 -0000
@@ -28,7 +28,7 @@
       $items['admin/content/node-type/'. $type_url_str .'/add_group'] = array(
         'title' => 'Add group',
         'page callback' => 'drupal_get_form',
-        'page arguments' => array('fieldgroup_edit_group_form', $type_name, '', 'add'),
+        'page arguments' => array('fieldgroup_group_edit_form', $type_name, '', 'add'),
         'access arguments' => array('administer content types'),
         'type' => MENU_LOCAL_TASK,
         'weight' => 3,
@@ -36,7 +36,7 @@
       $items['admin/content/node-type/'. $type_url_str .'/groups/%'] = array(
         'title' => 'Edit group',
         'page callback' => 'drupal_get_form',
-        'page arguments' => array('fieldgroup_edit_group_form', $type_name, 5, 'edit'),
+        'page arguments' => array('fieldgroup_group_edit_form', $type_name, 5, 'edit'),
         'access arguments' => array('administer content types'),
         'type' => MENU_CALLBACK,
       );
@@ -92,7 +92,7 @@
   cache_clear_all('fieldgroup_data', content_cache_tablename());
 }
 
-function fieldgroup_edit_group_form(&$form_state, $type_name, $group_name, $action) {
+function fieldgroup_group_edit_form(&$form_state, $type_name, $group_name, $action) {
   $content_type = content_types($type_name);
   $groups = fieldgroup_groups($content_type['type']);
 
@@ -170,7 +170,7 @@
 
   $form['#content_type'] = $content_type;
   $form['#group_action'] = $action;
-  $form['#submit'][] = 'fieldgroup_edit_group_submit';
+
   return $form;
 }
 
@@ -182,7 +182,7 @@
  * present a machine-readable name field as well as a label instead of
  * trying to create a machine-readable name from the label.
  */
-function fieldgroup_edit_group_validate($form, &$form_state) {
+function fieldgroup_group_edit_form_validate($form, &$form_state) {
   $form_values = $form_state['values'];
   $content_type = $form['#content_type'];
   $action = $form['#group_action'];
@@ -203,7 +203,7 @@
   }
 }
 
-function fieldgroup_edit_group_submit($form, &$form_state) {
+function fieldgroup_group_edit_form_submit($form, &$form_state) {
   $form_values = $form_state['values'];
   $content_type = $form['#content_type'];
 
@@ -338,28 +338,28 @@
   }
   // The group is only added here so it will appear in the export
   // when using Content Copy.
-  elseif ($form_id == '_content_admin_field' && isset($form['widget'])) {
+  elseif ($form_id == 'content_field_edit_form' && isset($form['widget'])) {
     $content_type = content_types($form['type_name']['#value']);
     $form['widget']['group'] = array(
       '#type' => 'value',
       '#value' => _fieldgroup_field_get_group($content_type['type'], $form['field_name']['#value']),
     );
   }
-  elseif ($form_id == 'content_admin_field_overview_form' && !empty($form['#groups'])) {
-    $form['#submit'][] = 'fieldgroup_content_overview_form_submit';
+  elseif ($form_id == 'content_field_overview_form' && !empty($form['#groups'])) {
+    $form['#submit'][] = 'fieldgroup_field_overview_form_submit';
   }
-  elseif ($form_id == 'content_admin_display_overview_form' && !empty($form['#groups'])) {
+  elseif ($form_id == 'content_display_overview_form' && !empty($form['#groups'])) {
     $form['#submit'][] = 'fieldgroup_display_overview_form_submit';
     if (!isset($form['submit'])) {
       $form['submit'] = array('#type' => 'submit', '#value' => t('Save'), '#weight' => 10);
     }
   }
-  elseif ($form_id == '_content_admin_field_remove') {
-    $form['#submit'][] = 'fieldgroup_content_admin_field_remove_submit';
+  elseif ($form_id == 'content_field_remove_form') {
+    $form['#submit'][] = 'fieldgroup_field_remove_form_submit';
   }
 }
 
-function fieldgroup_content_overview_form_submit($form, &$form_state) {
+function fieldgroup_field_overview_form_submit($form, &$form_state) {
   $form_values = $form_state['values'];
   $type_name = $form['#type_name'];
   foreach ($form_values as $key => $values) {
@@ -391,7 +391,7 @@
   }
 }
 
-function fieldgroup_content_admin_field_remove_submit($form, &$form_state) {
+function fieldgroup_field_remove_form_submit($form, &$form_state) {
   $form_values = $form_state['values'];
   // TODO:
   // - when a (non last) field is removed from a group, a 'ghost row' remains in the fields overview
Index: includes/content.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/includes/content.admin.inc,v
retrieving revision 1.181.2.34
diff -u -r1.181.2.34 content.admin.inc
--- includes/content.admin.inc	1 Sep 2008 14:38:12 -0000	1.181.2.34
+++ includes/content.admin.inc	6 Sep 2008 15:49:47 -0000
@@ -58,7 +58,7 @@
 /**
  * Menu callback; lists all defined fields for quick reference.
  */
-function _content_admin_type_fields() {
+function content_fields_list() {
   $fields = content_fields();
   $field_types = _content_field_types();
 
@@ -99,7 +99,7 @@
  * Allows fields to be reordered and nested in fieldgroups using
  * JS drag-n-drop. Non-CCK form elements can also be moved around.
  */
-function content_admin_field_overview_form(&$form_state, $type_name) {
+function content_field_overview_form(&$form_state, $type_name) {
   // When displaying the form, make sure the list of 'extra' fields
   // is up-to-date.
   if (empty($form_state['post'])) {
@@ -212,9 +212,9 @@
 }
 
 /**
- *  Theme the field overview table.
+ * Theme the field overview table.
  */
-function theme_content_admin_field_overview_form($form) {
+function theme_content_field_overview_form($form) {
   if (empty($form['#order'])) {
     return;
   }
@@ -266,7 +266,7 @@
   return $output;
 }
 
-function content_admin_field_overview_form_submit($form, &$form_state) {
+function content_field_overview_form_submit($form, &$form_state) {
   $form_values = $form_state['values'];
 
   // Update field weights.
@@ -298,7 +298,7 @@
  * Form includes form widgets to select which fields appear for teaser, full node
  * and how the field labels should be rendered.
  */
-function content_admin_display_overview_form(&$form_state, $type_name, $contexts_selector = CONTENT_CONTEXTS_SIMPLE) {
+function content_display_overview_form(&$form_state, $type_name, $contexts_selector = CONTENT_CONTEXTS_SIMPLE) {
   // Gather type information.
   $type = content_types($type_name);
   $field_types = _content_field_types();
@@ -424,7 +424,7 @@
 /**
  *  Theme the display overview table.
  */
-function theme_content_admin_display_overview_form($form) {
+function theme_content_display_overview_form($form) {
   $output = '';
   if (isset($form['#order'])) {
     $contexts_selector = $form['#contexts'];
@@ -465,7 +465,7 @@
 /**
  * Submit handler for the display overview form.
  */
-function content_admin_display_overview_form_submit($form, &$form_state) {
+function content_display_overview_form_submit($form, &$form_state) {
   module_load_include('inc', 'content', 'includes/content.crud');
   $form_values = $form_state['values'];
   foreach ($form_values as $key => $values) {
@@ -485,7 +485,7 @@
 /**
  * Menu callback; presents the form for adding a new field.
  */
-function _content_admin_field_add($type_name) {
+function content_field_add($type_name) {
   // make sure the old field list gets cleared before creating the new one
   if (!isset($_POST['edit'])) {
     content_clear_type_cache();
@@ -493,7 +493,7 @@
   $output = '';
   $options = content_field_type_options();
   if (!empty($options)) {
-    $output .= drupal_get_form('content_admin_field_main', array('type_name' => $type_name));
+    $output .= drupal_get_form('content_field_main_form', array('type_name' => $type_name));
   }
   else {
     drupal_set_message(t('No field modules are enabled. You need to <a href="!modules_url">enable one</a>, such as text.module, before you can add new fields.', array('!modules_url' => url('admin/build/modules'))), 'error');
@@ -541,7 +541,7 @@
   return !empty($options[$field_type]) ? $options[$field_type] : array();
 }
 
-function _content_admin_field_add_existing(&$form_state, $type_name) {
+function content_field_add_existing_form(&$form_state, $type_name) {
   $output = '';
   $type = content_types($type_name);
   $fields = content_fields();
@@ -578,7 +578,7 @@
 /**
  * Add an existing field to a content type.
  */
-function _content_admin_field_add_existing_submit($form, &$form_state) {
+function content_field_add_existing_form_submit($form, &$form_state) {
   module_load_include('inc', 'content', 'includes/content.crud');
   $form_values = $form_state['values'];
   $form_values['field_name'] = $form_values['existing_field_name'];
@@ -604,7 +604,7 @@
 /**
  * A form element for selecting field, widget, and label.
  */
-function content_admin_field_main(&$form_state, $form_values) {
+function content_field_main_form(&$form_state, $form_values) {
   module_load_include('inc', 'content', 'includes/content.crud');
   $form = array();
   if (!empty($form_state['storage'])) {
@@ -626,7 +626,7 @@
   // If we haven't chosen a field name yet, include an option to
   // share an existing field instead.
   if (empty($field_name)) {
-    $form['#prefix'] = drupal_get_form('_content_admin_field_add_existing', $type_name);
+    $form['#prefix'] = drupal_get_form('content_field_add_existing_form', $type_name);
   }
 
   // See if we're editing an existing field or a new field.
@@ -715,15 +715,15 @@
     '#type' => 'submit',
     '#value' => t('Continue'),
   );
-  $form['#validate'] = array('content_admin_field_main_validate');
-  $form['#submit'] = array('content_admin_field_main_submit');
+  $form['#validate'] = array('content_field_main_form_validate');
+  $form['#submit'] = array('content_field_main_form_submit');
   return $form;
 }
 
 /**
  *  Field name validation.
  */
-function content_admin_field_main_validate($form, &$form_state) {
+function content_field_main_form_validate($form, &$form_state) {
   $form_values = $form_state['values'];
   $field_name = $form_values['field_name'];
 
@@ -761,7 +761,7 @@
 /**
  * Create a new field for a content type.
  */
-function content_admin_field_main_submit($form, &$form_state) {
+function content_field_main_form_submit($form, &$form_state) {
   $form_values = $form_state['values'];
   $form_state['storage'] = $form_values;
   if (empty($form_values['type']) || empty($form_values['widget_type'])) {
@@ -815,7 +815,7 @@
 /**
  * Menu callback; present a form for removing a field from a content type.
  */
-function _content_admin_field_remove(&$form_state, $type_name, $field_name) {
+function content_field_remove_form(&$form_state, $type_name, $field_name) {
   $type = content_types($type_name);
   $field = $type['fields'][$field_name];
 
@@ -849,7 +849,7 @@
 /**
  * Remove a field from a content type.
  */
-function _content_admin_field_remove_submit($form, &$form_state) {
+function content_field_remove_form_submit($form, &$form_state) {
   module_load_include('inc', 'content', 'includes/content.crud');
   $form_values = $form_state['values'];
 
@@ -877,7 +877,7 @@
 /**
  * Menu callback; presents the field editing page.
  */
-function _content_admin_field(&$form_state, $type_name, $field_name) {
+function content_field_edit_form(&$form_state, $type_name, $field_name) {
   $output = '';
   $type = content_types($type_name);
   $field = $type['fields'][$field_name];
@@ -902,7 +902,7 @@
   if (isset($form_state['change_basic'])) {
     module_load_include('inc', 'content', 'includes/content.crud');
     $field_values = content_field_instance_collapse($field);
-    return content_admin_field_main($form_state, $field_values);
+    return content_field_main_form($form_state, $field_values);
   }
 
   $form = array();
@@ -939,7 +939,7 @@
   $form['main']['change'] = array(
     '#type' => 'submit',
     '#value' => t('Change basic information'),
-    '#submit' => array('_content_admin_field_update_basic_submit'),
+    '#submit' => array('content_field_edit_form_submit_update_basic'),
   );
 
   $form['widget'] = array(
@@ -1115,7 +1115,7 @@
 /**
  * Validate a field's settings.
  */
-function _content_admin_field_validate($form, &$form_state) {
+function content_field_edit_form_validate($form, &$form_state) {
   $form_values = $form_state['values'];
   if (isset($form_state['change_basic']) || $form_values['op'] == t('Change basic information')) {
     return;
@@ -1226,7 +1226,7 @@
 /**
  * Button submit handler.
  */
-function _content_admin_field_update_basic_submit($form, &$form_state) {
+function content_field_edit_form_submit_update_basic($form, &$form_state) {
   $form_state['change_basic'] = TRUE;
   $form_state['rebuild'] = TRUE;
 }
@@ -1234,7 +1234,7 @@
 /**
  * Save a field's settings after editing.
  */
-function _content_admin_field_submit($form, &$form_state) {
+function content_field_edit_form_submit($form, &$form_state) {
   module_load_include('inc', 'content', 'includes/content.crud');
   $form_values = $form_state['values'];
   content_field_instance_update($form_values);
Index: modules/content_copy/content_copy.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/modules/content_copy/content_copy.module,v
retrieving revision 1.27.2.10
diff -u -r1.27.2.10 content_copy.module
--- modules/content_copy/content_copy.module	6 Sep 2008 15:30:38 -0000	1.27.2.10
+++ modules/content_copy/content_copy.module	6 Sep 2008 15:49:47 -0000
@@ -175,7 +175,7 @@
     $groups = array_filter($form_values['groups']);
     foreach ($groups as $group) {
       $group_state = array('values' => array('group_name' => $group));
-      drupal_execute('fieldgroup_edit_group_form', $group_state, $form_values['type_name'], $group, 'edit');
+      drupal_execute('fieldgroup_group_edit_form', $group_state, $form_values['type_name'], $group, 'edit');
     }
   }
 
@@ -203,7 +203,7 @@
             $field_state['values']['group'] = $group_name;
           }
         }
-        drupal_execute('_content_admin_field', $field_state, $form_values['type_name'], $field_name);
+        drupal_execute('content_field_edit_form', $field_state, $form_values['type_name'], $field_name);
       }
     }
   }
@@ -426,7 +426,7 @@
  * Intervene to run form through macro when doing export
  */
 function content_copy_form_alter(&$form, &$form_state, $form_id) {
-  $alter_forms = array('node_type_form', '_content_admin_field', 'fieldgroup_edit_group_form');
+  $alter_forms = array('node_type_form', 'content_field_edit_form', 'fieldgroup_group_edit_form');
   if (isset($GLOBALS['content_copy']) && $GLOBALS['content_copy']['status'] == 'export' && in_array($form_id, $alter_forms)) {
     $form['#submit'][] = 'content_copy_record_macro';
   }
@@ -504,7 +504,7 @@
       $GLOBALS['content_copy']['count'] += sizeof($edit) + 5;
       break;
 
-    case 'fieldgroup_edit_group_form':
+    case 'fieldgroup_group_edit_form':
       $subs['groups'][] = $edit;
       $GLOBALS['content_copy']['count'] += sizeof($edit) + 5;
       break;
Index: content.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/content.module,v
retrieving revision 1.301.2.43
diff -u -r1.301.2.43 content.module
--- content.module	5 Sep 2008 16:31:11 -0000	1.301.2.43
+++ content.module	6 Sep 2008 15:49:46 -0000
@@ -101,7 +101,7 @@
   $items = array();
   $items['admin/content/types/fields'] = array(
     'title' => 'Fields',
-    'page callback' => '_content_admin_type_fields',
+    'page callback' => 'content_fields_list',
     'access arguments' => array('administer content types'),
     'file' => 'includes/content.admin.inc',
     'type' => MENU_LOCAL_TASK,
@@ -124,7 +124,7 @@
       $items['admin/content/node-type/'. $type_url_str .'/fields'] = array(
         'title' => 'Manage fields',
         'page callback' => 'drupal_get_form',
-        'page arguments' => array('content_admin_field_overview_form', $type_name),
+        'page arguments' => array('content_field_overview_form', $type_name),
         'access arguments' => array('administer content types'),
         'file' => 'includes/content.admin.inc',
         'type' => MENU_LOCAL_TASK,
@@ -133,7 +133,7 @@
       $items['admin/content/node-type/'. $type_url_str .'/display'] = array(
         'title' => 'Display fields',
         'page callback' => 'drupal_get_form',
-        'page arguments' => array('content_admin_display_overview_form', $type_name),
+        'page arguments' => array('content_display_overview_form', $type_name),
         'access arguments' => array('administer content types'),
         'file' => 'includes/content.admin.inc',
         'type' => MENU_LOCAL_TASK,
@@ -141,20 +141,20 @@
       );
       $items['admin/content/node-type/'. $type_url_str .'/display/general'] = array(
         'title' => 'General',
-        'page arguments' => array('content_admin_display_overview_form', $type_name),
+        'page arguments' => array('content_display_overview_form', $type_name),
         'type' => MENU_DEFAULT_LOCAL_TASK,
         'weight' => 0,
       );
       $items['admin/content/node-type/'. $type_url_str .'/display/advanced'] = array(
         'title' => 'Advanced',
-        'page arguments' => array('content_admin_display_overview_form', $type_name, (string)CONTENT_CONTEXTS_ADVANCED),
+        'page arguments' => array('content_display_overview_form', $type_name, (string)CONTENT_CONTEXTS_ADVANCED),
         'access arguments' => array('administer content types'),
         'type' => MENU_LOCAL_TASK,
         'weight' => 1,
       );
       $items['admin/content/node-type/'. $type_url_str .'/add_field'] = array(
         'title' => 'Add field',
-        'page callback' => '_content_admin_field_add',
+        'page callback' => 'content_field_add',
         'page arguments' => array($type_name),
         'access arguments' => array('administer content types'),
         'file' => 'includes/content.admin.inc',
@@ -168,7 +168,7 @@
         $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_admin_field', $type_name, $field_name),
+          '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,
@@ -176,7 +176,7 @@
         $items['admin/content/node-type/'. $type_url_str .'/fields/'. $field_name .'/remove'] = array(
           'title' => 'Remove field',
           'page callback' => 'drupal_get_form',
-          'page arguments' => array('_content_admin_field_remove', $type_name, $field_name),
+          'page arguments' => array('content_field_remove_form', $type_name, $field_name),
           'access arguments' => array('administer content types'),
           'file' => 'includes/content.admin.inc',
           'type' => MENU_CALLBACK,
@@ -220,10 +220,10 @@
     'content_overview_links' => array(
       'arguments' => array(),
     ),
-    'content_admin_field_overview_form' => array(
+    'content_field_overview_form' => array(
       'arguments' => array('form' => NULL),
     ),
-    'content_admin_display_overview_form' => array(
+    'content_display_overview_form' => array(
       'arguments' => array('form' => NULL),
     ),
     'content_admin_field_add_new_field_widget_type' => array(
Index: tests/content.crud.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/tests/content.crud.test,v
retrieving revision 1.4.2.11
diff -u -r1.4.2.11 content.crud.test
--- tests/content.crud.test	5 Sep 2008 15:00:25 -0000	1.4.2.11
+++ tests/content.crud.test	6 Sep 2008 15:49:48 -0000
@@ -658,6 +658,7 @@
     $edit['name']  = $this->randomName(10);
     $edit['type']  = $type1;
     $this->drupalPost('admin/content/types/add', $edit, 'Save content type');
+
     // Create a text field via the UI.
     $edit = array();
     $edit['field_name']  = strtolower($this->randomName(10));
@@ -672,12 +673,13 @@
     $this->drupalPost(NULL, $edit, 'Continue');
     $this->assertRaw('Created field <em>'. $field_label, 'Success message displayed');
     $this->drupalPost($admin_type1_url .'/fields/'. $field_url, array(), 'Save field settings');
-    // Check the schema - the vlaues should be in the per-type table.
+    // Check the schema - the values should be in the per-type table.
     $this->assertSchemaMatchesTables(array(
       'per_type' => array(
         $type1 => array($field_url => array('value')),
       ),
     ));
+
     // Add a second content type.
     $edit = array();
     $type2 = 'simpletest'. mt_rand();
@@ -685,6 +687,7 @@
     $edit['name']  = $this->randomName(10);
     $edit['type']  = $type2;
     $this->drupalPost('admin/content/types/add', $edit, 'Save content type');
+
     // Add the same field to a second content type.
     $edit = array();
     $edit['existing_field_name'] = $field_url;
@@ -1097,4 +1100,4 @@
   }
 
 }
-}
+
