### Eclipse Workspace Patch 1.0
#P imagefield
Index: imagefield.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/imagefield/imagefield.module,v
retrieving revision 1.29
diff -u -r1.29 imagefield.module
--- imagefield.module	1 Dec 2006 06:16:02 -0000	1.29
+++ imagefield.module	7 Dec 2006 15:35:12 -0000
@@ -553,10 +553,14 @@
   if (module_exists('imagecache')) {
     $rules = _imagecache_get_presets();
     if (in_array($formatter, (array) $rules)) {
-      return theme('imagecache', $formatter, $file['filepath'], $item['alt'], $item['title']);
+      $image = theme('imagecache', $formatter, $file['filepath'], $item['alt'], $item['title']);
     }
   }
-  return theme('imagefield_image', $file, $item['alt'], $item['title']);
+  else {
+    $image = theme('imagefield_image', $file, $item['alt'], $item['title']);
+  }
+  
+  return theme('imagefield_image_wrap', $image, $formatter, $item);
 }
 
 
@@ -598,7 +602,6 @@
 }
 
 function theme_imagefield_image($file, $alt = '', $title = '', $attributes = NULL, $getsize = TRUE) {
-  
   $file = (array)$file;
   if (!$getsize || (is_file($file['filepath']) && (list($width, $height, $type, $image_attributes) = @getimagesize($file['filepath'])))) {
     $attributes = drupal_attributes($attributes);
@@ -661,3 +664,13 @@
     }
   }
 }
+
+function theme_imagefield_image_wrap($image, $formatter, $item) {
+  global $base_url;
+  if ($item['filepath']) {
+     return '<a href="'. $base_url. '/'. $item['filepath']. '">'. $image. '</a>';
+   break;
+
+  }
+  return $image;
+}
\ No newline at end of file
