Index: reptag.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/reptag/reptag.install,v
retrieving revision 1.15.2.12
diff -u -r1.15.2.12 reptag.install
--- reptag.install	25 Jul 2007 16:14:31 -0000	1.15.2.12
+++ reptag.install	13 Aug 2008 20:51:30 -0000
@@ -208,6 +208,30 @@
   return $ret;
 }
 
+function reptag_update_7() {
+  $ret = array();
+  $content_types = node_get_types('types');
+  foreach ($content_types as $type) {
+    $new_fields = array();
+    $fields = (array)unserialize(variable_get('reptag_type_'. $type->type .'_fields', serialize(array('content/body/#value'))));
+    foreach ($fields as $field) {
+      switch ($field) {
+        case 'title':
+          $new_fields[] = 'title';
+          break;
+        default:
+          if (preg_match('#^content/([^/]+)/#i', $field, $matches)) {
+            $new_fields[] = $matches[1];
+          }
+      }
+    }
+    $ret[] = array('success' => TRUE, 'query' => 'Updating \''. check_plain($type->type) .'\' fields ...');
+    variable_set('reptag_type_'. $type->type .'_fields', serialize($new_fields));
+  }
+
+  return $ret;
+}
+
 function reptag_uninstall() {
   // drop tables
   db_query('DROP TABLE {reptag_vars}');
Index: reptag.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/reptag/reptag.module,v
retrieving revision 1.35.2.21
diff -u -r1.35.2.21 reptag.module
--- reptag.module	4 Jun 2008 11:58:56 -0000	1.35.2.21
+++ reptag.module	13 Aug 2008 21:01:16 -0000
@@ -201,12 +201,26 @@
 function reptag_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
   $disabled_nids = unserialize(variable_get('reptag_disabled_nids', serialize(array())));
   if (variable_get('reptag_enable', 0) && (!$node->nid || !in_array($node->nid, $disabled_nids))) {
-    $fields = (array)unserialize(variable_get('reptag_type_'. $node->type .'_fields', serialize(array('content/body/#value'))));
-    // add 'body' to the list of fields if 'content/body/#value' is selected
-    // (rss feeds and manual layouts sometimes print out the body field directly)
-    if (in_array('content/body/#value', $fields)) {
-      $fields[] = 'body';
+    $fields = (array)unserialize(variable_get('reptag_type_'. $node->type .'_fields', serialize(array('body'))));
+    // support for cck multiple values fields
+    $field_iterator = $fields;
+    foreach ($field_iterator as $field) {
+      switch ($field) {
+        case 'title':
+          break;
+        case 'body':
+          $fields[] = 'content/body/#value';
+          break;
+        default:
+          $fields[] = 'content/'. $field .'/#value';
+          if (isset($node->$field)) {
+            foreach ($node->$field as $idx => $content) {
+              $fields[] = $field .'/'. $idx .'/view';
+            }
+          }
+      }
     }
+    // process the fields
     switch ($op) {
       case 'update':
       case 'delete':
Index: reptag_admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/reptag/reptag_admin.inc,v
retrieving revision 1.12.2.23
diff -u -r1.12.2.23 reptag_admin.inc
--- reptag_admin.inc	5 Jun 2008 12:09:18 -0000	1.12.2.23
+++ reptag_admin.inc	13 Aug 2008 20:08:52 -0000
@@ -424,13 +424,13 @@
     }
     // body field
     if ($type['has_body']) {
-      $form['content'][$type['type']]['content/body/#value']['label'] = array('#value' => t('Body'));
-      $form['content'][$type['type']]['content/body/#value']['type'] = array('#value' => t('text'));
-      $form['content'][$type['type']]['content/body/#value']['process'] = array(
+      $form['content'][$type['type']]['body']['label'] = array('#value' => t('Body'));
+      $form['content'][$type['type']]['body']['type'] = array('#value' => t('text'));
+      $form['content'][$type['type']]['body']['process'] = array(
         '#type' => 'checkbox',
         '#title' => '',
         '#return_value' => 1,
-        '#default_value' => in_array('content/body/#value', $fields)
+        '#default_value' => in_array('body', $fields)
       );
     }
     // cck fields
@@ -440,19 +440,18 @@
         $groups = fieldgroup_groups($type['type']);
         foreach ($groups as $group) {
           foreach ($group['fields'] as $field => $field_info) {
-            $field_path = 'content/'. $field .'/#value';
-            $form['content'][$type['type']][$field_path]['label'] = array('#value' => $field_info['label']);
+            $form['content'][$type['type']][$field]['label'] = array('#value' => $field_info['label']);
             if ($type['fields'][$field]['type'] == $type['fields'][$field]['widget']['type']) {
-              $form['content'][$type['type']][$field_path]['type'] = array('#value' => $type['fields'][$field]['type']);
+              $form['content'][$type['type']][$field]['type'] = array('#value' => $type['fields'][$field]['type']);
             }
             else {
-              $form['content'][$type['type']][$field_path]['type'] = array('#value' => $type['fields'][$field]['type'] .' / '. $type['fields'][$field]['widget']['type']);
+              $form['content'][$type['type']][$field]['type'] = array('#value' => $type['fields'][$field]['type'] .' / '. $type['fields'][$field]['widget']['type']);
             }
-            $form['content'][$type['type']][$field_path]['process'] = array(
+            $form['content'][$type['type']][$field]['process'] = array(
               '#type' => 'checkbox',
               '#title' => '',
               '#return_value' => 1,
-              '#default_value' => ($type['fields'][$field]['type'] != 'text') ? FALSE : in_array($field_path, $fields),
+              '#default_value' => ($type['fields'][$field]['type'] != 'text') ? FALSE : in_array($field, $fields),
               '#disabled' => ($type['fields'][$field]['type'] != 'text') ? TRUE : FALSE
             );
             unset($type['fields'][$field]);
@@ -460,19 +459,18 @@
         }
       }
       foreach ($type['fields'] as $field => $field_info) {
-        $field_path = 'content/'. $field .'/#value';
-        $form['content'][$type['type']][$field_path]['label'] = array('#value' => $field_info['widget']['label']);
+        $form['content'][$type['type']][$field]['label'] = array('#value' => $field_info['widget']['label']);
         if ($field_info['type'] == $field_info['widget']['type']) {
-          $form['content'][$type['type']][$field_path]['type'] = array('#value' => $field_info['type']);
+          $form['content'][$type['type']][$field]['type'] = array('#value' => $field_info['type']);
         }
         else {
-          $form['content'][$type['type']][$field_path]['type'] = array('#value' => $field_info['type'] .' / '. $field_info['widget']['type']);
+          $form['content'][$type['type']][$field]['type'] = array('#value' => $field_info['type'] .' / '. $field_info['widget']['type']);
         }
-        $form['content'][$type['type']][$field_path]['process'] = array(
+        $form['content'][$type['type']][$field]['process'] = array(
           '#type' => 'checkbox',
           '#title' => '',
           '#return_value' => 1,
-          '#default_value' => ($field_info['type'] != 'text') ? FALSE : in_array($field_path, $fields),
+          '#default_value' => ($field_info['type'] != 'text') ? FALSE : in_array($field, $fields),
           '#disabled' => ($field_info['type'] != 'text') ? TRUE : FALSE
         );
       }
