--- piclens_views.module.old	2008-07-25 23:51:13.000000000 +1000
+++ piclens_views.module	2008-12-10 10:19:53.000000000 +1000
@@ -163,22 +163,35 @@ function piclens_views_mediarss_items($a
             $filepath_full = $node->images['_original'];
             $thumbnail = '';
             if ($content_value == 'node_image_original') $content = '';
-          }
+			$thumb = file_create_url($thumbnail . $filepath_thumb);
+			$full = file_create_url($content . $filepath_full);
+			// create rss item
+			$item = array(
+				'title' => $title,
+				'link' => url('node/'. $val->nid, NULL, NULL, TRUE),
+				'thumbnail' => $thumb,
+				'content' => $full,
+			 );
+			 $items .= mediarssapi_format_item($item);
+          } //end if ($node->type == 'image')
           else {
             $imagefield = 'field_'. $imagefield_name;
-            $filepath_thumb = $node->{$imagefield}[0]['filepath'];
-            $filepath_full = $filepath_thumb;
-          }
-          $thumb = file_create_url($thumbnail . $filepath_thumb);
-          $full = file_create_url($content . $filepath_full);
-          // create rss item
-          $item = array(
-            'title' => $title,
-            'link' => url('node/'. $val->nid, NULL, NULL, TRUE),
-            'thumbnail' => $thumb,
-            'content' => $full,
-          );
-          $items .= mediarssapi_format_item($item);
+			$imagefields = $node->{$imagefield};
+			foreach ($imagefields as $images) {
+				$filepath_thumb = $images['filepath'];
+				$filepath_full = $filepath_thumb;
+				$thumb = file_create_url($thumbnail . $filepath_thumb);
+				$full = file_create_url($content . $filepath_full);
+				// create rss item
+				$item = array(
+					'title' => $title,
+					'link' => url('node/'. $val->nid, NULL, NULL, TRUE),
+					'thumbnail' => $thumb,
+					'content' => $full,
+				 );
+				$items .= mediarssapi_format_item($item);
+			} //end else
+          } //end foreach ($view_results['items'] as $key => $val)
         }
         return $items;
       }
