Index: openid_cp_field.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/openid_cp_field/openid_cp_field.module,v
retrieving revision 1.1.2.7
diff -u -p -r1.1.2.7 openid_cp_field.module
--- openid_cp_field.module	21 Apr 2009 14:28:35 -0000	1.1.2.7
+++ openid_cp_field.module	23 Apr 2009 14:01:49 -0000
@@ -8,7 +8,7 @@
 
 define('OPENID_CP_FIELD_NORMAL', 0);
 define('OPENID_CP_FIELD_DEFAULT', 1);
-define('OPENID_CP_FIELD_OVERRIDEN', 2);
+define('OPENID_CP_FIELD_OVERRIDDEN', 2);
 
 /**
  * Implementation of hook_perm().
@@ -122,28 +122,27 @@ function openid_cp_field_map($form_state
     $rows[] = array('node' => $node_label, 'openid' => 'SReg: '. $sreg_fields[$openid], 'link' => l(t('Delete'), "openid_cp_field/delete/{$type['type']}/". base64_encode($openid) .'/sreg'));
   }
   if (count($rows) > 0) {
-    $current_map = theme('table', array('node' => t('Node field'), 'openid' => t('OpenID'), 'link' => t('Operation')), $rows);
+    $current_map = theme('table', array('node' => t('Node field'), 'openid' => t('OpenID field'), 'link' => t('Operation')), $rows);
   }
-  if ($source == OPENID_CP_FIELD_NORMAL) {
-    $source_msg = t('defined via the user interface.');
+  if ($source == OPENID_CP_FIELD_DEFAULT) {
+    $status = t('(default)');
   }
-  elseif ($source == OPENID_CP_FIELD_DEFAULT) {
-    $source_msg = t('defined via an external module.');
+  elseif ($source == OPENID_CP_FIELD_OVERRIDDEN) {
+    $status = t('(default, <em>overridden</em>)');
   }
-  elseif ($source == OPENID_CP_FIELD_OVERRIDEN) {
-    $source_msg = t('defined via an external module file, but uses the overridden version from the user-interface. With Revert button you can drop the changes.');
+  else { // OPENID_CP_FIELD_NORMAL
+    $status = '';
   }
   $form['current_map'] = array(
     '#type' => 'fieldset',
-    '#title' => t('The currently defined relationships'),
-    '#collapsible' => TRUE,
-    '#collapsed' => count($rows) > 0 ? FALSE : TRUE,
-    '#description' => t('The source of the current mapping is: !source', array('!source' => $source_msg)),
+    '#title' => t('Mappings !status', array('!status' => $status)),
+    '#collapsible' => FALSE,
+    '#description' => $source_msg,
   );
   $form['current_map']['map'] = array(
     '#value' => isset($current_map) ? $current_map : '',
   );
-  if ($source == OPENID_CP_FIELD_OVERRIDEN) {
+  if ($source == OPENID_CP_FIELD_OVERRIDDEN) {
     $form['current_map']['revert'] = array(
       '#type' => 'submit',
       '#value' => t('Revert'),
@@ -151,10 +150,10 @@ function openid_cp_field_map($form_state
   }
   $form['map'] = array(
     '#type' => 'fieldset',
-    '#title' => t('Define a relationship between OpenID attributes and CCK fields'),
+    '#title' => t('Map node fields to OpenID attributes'),
   );
   if (count($options_node) == 0 || (count($openid_attrs) == 0 && count($openid_sreg_fields) == 0)) {
-    $form['map']['info'] = array('#value' => t('No more fields to map, please delete a relationship if you want to modify the current mapping.'));
+    $form['map']['info'] = array('#value' => t('No more fields to map.'));
   }
   else {
     drupal_add_css(drupal_get_path('module', 'openid_cp_field') ."/openid_cp_field.css", "module");
@@ -172,6 +171,7 @@ function openid_cp_field_map($form_state
       '#type' => 'submit',
       '#value' => t('Add'),
     );
+    $form['map']['#description'] = t('AX prefixed attributes follows the attribute exchange specification from axschema.org and they are compatible with the sites using the same set of attributes. SReg prefixed attributes are more widely supported but there are only a very limited number of attributes.');
   }
   $form['type'] = array(
       '#type' => 'value',
@@ -279,7 +279,6 @@ function openid_cp_field_openid_provider
 function openid_cp_field_openid_provider_ax($op, $attributes) {
   if ($op == 'load') {
     $response = array();
-    $fields = array();
     $short_names = array();
     if (isset($attributes['openid.ax.if_available'])) {
       $short_names += explode(',', $attributes['openid.ax.if_available']);
@@ -320,7 +319,7 @@ function openid_cp_field_get_mapping(&$m
     if (is_array($mapping_imported[$type]) && count($mapping_imported[$type]) > 0) {
       if (count($in_variable) > 0 && $in_variable != $mapping_imported[$type]) {
         $mapping = variable_get('openid_cp_field_map_'. $type, array());
-        return OPENID_CP_FIELD_OVERRIDEN;
+        return OPENID_CP_FIELD_OVERRIDDEN;
       }
       else {
         $mapping = $mapping_imported[$type];
