Index: imagefield.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/imagefield/imagefield.install,v
retrieving revision 1.31
diff -u -p -r1.31 imagefield.install
--- imagefield.install	15 Apr 2009 20:15:03 -0000	1.31
+++ imagefield.install	6 May 2009 18:34:09 -0000
@@ -63,6 +63,18 @@ function imagefield_update_6003() {
     return $ret;
   }
 
+  $formatters = array(
+    'default' => 'image_plain',
+    'imagefield_nodelink' => 'image_nodelink',
+    'imagefield_imagelink' => 'image_imagelink',
+    'imagefield_path' => 'path_plain',
+    'imagefield_url' => 'url_plain',
+  );
+  $result = db_query("SELECT v.vid, v.tablename, v.field, v.options FROM {" . content_field_tablename() . "} c INNER JOIN {view_tablefield} v ON v.field = CONCAT(c.field_name, '_fid') WHERE c.module = 'imagefield' OR c.type = 'image'");
+  while ($field = db_fetch_object($result)) {
+    $ret[] = update_sql("UPDATE {view_tablefield} SET options = '{$formatters[$field->options]}' WHERE vid = $field->vid AND tablename = '$field->tablename' AND field = '$field->field'");
+  }
+
   $ret[] = update_sql("UPDATE {" . content_field_tablename() . "} SET type = 'filefield', module = 'filefield', active = 1 WHERE module = 'imagefield' OR type = 'image'");
   $ret[] = update_sql("UPDATE {" . content_instance_tablename() . "} SET widget_type = 'imagefield_widget', widget_module = 'imagefield', widget_active = 1 WHERE widget_type = 'image' OR widget_type = 'imagefield_widget'");
   content_clear_type_cache();
