? .DS_Store
? 207557-image-update-duplicates.patch
? 568078-image_gallery-inc-pages-files.patch
? 568734-image-permissions-update.patch
? _PATCHES bones
? image_install_escape.patch
? contrib/.DS_Store
? contrib/image_attach/.DS_Store
? contrib/image_gallery/.DS_Store
? contrib/image_gallery/help/.DS_Store
? contrib/image_gallery/views/.DS_Store
? contrib/image_gallery/views/theme/.DS_Store
? contrib/image_import/image_import_subgalleries.patch
? views/.DS_Store
? views/theme/.DS_Store
Index: image.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/image/image.install,v
retrieving revision 1.29
diff -u -p -r1.29 image.install
--- image.install	5 Sep 2009 09:15:54 -0000	1.29
+++ image.install	5 Sep 2009 09:58:06 -0000
@@ -263,12 +263,12 @@ function image_update_5200() {
 
   // Upgrade from 5.x-1.x to 5.x-2.x.
   if (db_table_exists('file_revisions')) {
-    $ret[] = update_sql("INSERT INTO {image} SELECT DISTINCT f.nid, f.fid, f.filename FROM {files} f INNER JOIN {node} n ON f.nid = n.nid WHERE n.type = 'image' AND f.filename" . $cond);
+    $ret[] = update_sql("INSERT INTO {image} SELECT DISTINCT f.nid, f.fid, f.filename FROM {files} f INNER JOIN {node} n ON f.nid = n.nid WHERE n.type = 'image' AND f.filename" . $cond . " GROUP BY nid,filename");
     $ret[] = update_sql("DELETE FROM {file_revisions} WHERE EXISTS (SELECT * FROM {image} WHERE {image}.fid = {file_revisions}.fid)");
   }
   // Upgrade from 5.x to 6.x-1.x.
   else {
-    $ret[] = update_sql("INSERT INTO {image} SELECT DISTINCT u.nid, f.fid, f.filename FROM {upload} u INNER JOIN {files} f ON u.fid = f.fid INNER JOIN {node} n ON u.nid = n.nid WHERE n.type = 'image' AND f.filename" . $cond);
+    $ret[] = update_sql("INSERT INTO {image} SELECT DISTINCT u.nid, f.fid, f.filename FROM {upload} u INNER JOIN {files} f ON u.fid = f.fid INNER JOIN {node} n ON u.nid = n.nid WHERE n.type = 'image' AND f.filename" . $cond . " GROUP BY nid,filename");
     $ret[] = update_sql("DELETE FROM {upload} WHERE EXISTS (SELECT * FROM {image} WHERE {image}.fid = {upload}.fid)");
   }
 
