Index: taxonomy_image_node_display.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/taxonomy_image/contributed/taxonomy_image_node_display/Attic/taxonomy_image_node_display.module,v
retrieving revision 1.1.4.16
diff -u -r1.1.4.16 taxonomy_image_node_display.module
--- taxonomy_image_node_display.module	16 Mar 2009 00:07:11 -0000	1.1.4.16
+++ taxonomy_image_node_display.module	16 Mar 2009 00:34:15 -0000
@@ -116,22 +116,18 @@
     $preset = $preset;
     $valid_nodes = array_filter($view);
     if (isset($valid_nodes[$node->type]) && isset($node->taxonomy)) {
-      $images = NULL;
+      $images = array();
       foreach ($node->taxonomy as $tid => $term) {
         $image = taxonomy_image_display($tid, NULL, $preset, array('wrapper' => FALSE));
         if ($view_link && $image) {
           $image = theme('taxonomy_image_display', $image, $term);
         }
-        $images .= $image;
+        $images[] = $image;
       }
       $node->content['taxonomy_image'] = array(
-        '#value' => $images,
+        '#value' => theme('taxonomy_image_display_images', $images),
         '#weight' => variable_get('taxonomy_image_node_view_weight', -5),
         );
-      if (!$view_link) {
-        $node->content['taxonomy_image']['#prefix'] = '<div class="taxonomy-images">';
-        $node->content['taxonomy_image']['#suffix'] = '</div>';
-      }
     }
   }
 }
@@ -144,6 +140,9 @@
     'taxonomy_image_display' => array(
       'arguments' => array('image', 'term'),
     ),
+    'taxonomy_image_display_images' => array(
+      'arguments' => array('images'),
+    ),
   );
 }
 
@@ -154,3 +153,13 @@
   $name = variable_get('taxonomy_image_node_show_name', TRUE) ? taxonomy_image_tt("taxonomy:term:$term->tid:name", $term->name) : NULL;
   return l($image, 'taxonomy/term/'. $term->tid, array('html' => TRUE, 'attributes' => array('class' => 'taxonomy-image-links'))) . $name;
 }
+
+function theme_taxonomy_image_display_images($images) {
+  if (!is_array($images) || count($images) == 0)
+    return NULL;
+  
+  $output = '<div class="taxonomy-images">';
+  $output .= implode('', $images);
+  $output .= '</div>';
+  return $output;
+}

