--- /home/barry/files/drupal/cvs/contributions/modules/image/contrib/image_gallery/image_gallery.module	2008-01-06 22:15:25.000000000 +0000
+++ /home/barry/drupal/sites/default/modules/image/contrib/image_gallery/image_gallery.module	2008-02-07 11:25:48.000000000 +0000
@@ -135,7 +135,7 @@ function image_gallery_page($type = NULL
     // The values of $descendant_tids should be safe for raw inclusion in the
     // SQL since they're all loaded from integer fields in the database.
     $sql = 'SELECT n.nid FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid WHERE tn.tid IN ('. implode(',', $descendant_tids) .') AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC';
-    if ($nid = db_result(db_query_range(db_rewrite_sql($sql)))) {
+    if ($nid = db_result(db_query(db_rewrite_sql($sql)))) {
       $galleries[$i]->latest = node_load(array('nid' => $nid));
     }
   }
@@ -342,7 +342,7 @@ function theme_image_gallery($galleries,
     foreach ($galleries as $gallery) {
       $content .= '<li class="clear-block">';
       if ($gallery->count) {
-        $content .= l(image_display($gallery->latest, IMAGE_THUMBNAIL), 'image/tid/'. $gallery->tid, array(), NULL, NULL, FALSE, TRUE);
+        $content .= l(image_display($gallery->latest, IMAGE_THUMBNAIL), 'image/tid/'. $gallery->tid, array('html' => TRUE));
       }
       $content .= "<h3>". l($gallery->name, 'image/tid/'. $gallery->tid) ."</h3>\n";
       $content .= '<div class="description">'. check_markup($gallery->description) ."</div>\n";
