Index: image_gallery.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/image/contrib/image_gallery/image_gallery.module,v
retrieving revision 1.5.2.12
diff -u -r1.5.2.12 image_gallery.module
--- image_gallery.module	22 Aug 2007 17:39:45 -0000	1.5.2.12
+++ image_gallery.module	3 Sep 2007 01:55:38 -0000
@@ -147,7 +147,9 @@
     $last = db_fetch_object(db_query_range(db_rewrite_sql('SELECT n.nid FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid WHERE tn.tid IN (%s) AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC'), implode(',', $descendant_tids), 0, 1));
     $galleries[$i]->latest = node_load(array('nid' => $last->nid));
   }
-
+  if (count($galleries)==0) { //still create a gallery object.  The description is useful for display purposes in the theme.  Themer can decide whether to show it or not
+    $galleries = taxonomy_get_term($tid);
+  }
   $images = array();
   if ($tid) {
     $result = pager_query(db_rewrite_sql("SELECT n.nid FROM {term_node} t INNER JOIN {node} n ON t.nid=n.nid WHERE n.status=1 AND n.type='image' AND t.tid=%d ORDER BY n.sticky DESC, n.created DESC"), variable_get('image_images_per_page', 6), 0, NULL, $tid);
@@ -330,7 +332,7 @@
   $size = image_get_sizes(IMAGE_THUMBNAIL);
 
   $content = '';
-  if (count($galleries)) {
+  if (count($galleries) > 1) {
     $content .= '<ul class="galleries">';
     foreach ($galleries as $gallery) {
       $content .= '<li class="clear-block">';
@@ -347,6 +349,9 @@
     }
     $content .= "</ul>\n";
   }
+  else{ //this is a solo gallery
+    $content .= '<div class="description">'. check_markup($galleries->description) ."</div>\n";
+  }
 
   if (!empty($images)) {
     $content .= '<ul class="images">';
