Index: modules/image_filter/image_filter.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/image_filter/image_filter.module,v
retrieving revision 1.7
diff -r1.7 image_filter.module
72c72
<     $result = db_query("SELECT n.nid, n.teaser, i.thumb_path FROM {image} i, {node} n WHERE n.status = 1 AND i.nid = n.nid AND n.nid IN ('" . implode("','", array_map('db_escape_string', $match[1])) . "')");
---
>     $result = db_query(db_rewrite_sql("SELECT n.nid, n.title, f.filepath FROM {files} f, {node} n WHERE n.status = 1 AND f.filename = 'thumbnail' AND f.nid = n.nid AND n.nid IN ('" . implode("','", array_map('db_escape_string', $match[1])) . "')"));
107c107
<     $result = db_query("SELECT n.nid, n.title, i.thumb_path FROM {image} i, {node} n WHERE n.status = 1 AND i.nid = n.nid AND n.nid IN ('" . implode("','", array_map("db_escape_string", $match[1])) . "')");
---
> 	$result = db_query(db_rewrite_sql("SELECT n.nid, n.title, f.filepath FROM {files} f, {node} n WHERE n.status = 1 AND f.filename = 'thumbnail' AND f.nid = n.nid AND n.nid IN ('" . implode("','", array_map("db_escape_string", $match[1])) . "')"));
153c153,154
<   return l('<img src="' . ($img->width || $img->height ? url("image/view/$img->nid", 'res=' . $img->width . "x$img->height") : "$base_url/$img->thumb_path") . '"' . ($img->width ? " width=\"$img->width\"" : '') . ($img->height ? " height=\"$img->height\"" : NULL) . ($img->align ? " align=\"$img->align\"" : '') . ($img->border ? " border=\"$img->border\"" : '') . ($img->hspace ? " hspace=\"$img->hspace\"" : '') . ($img->vspace ? " vspace=\"$img->vspace\"" : '') . " alt=\"$img->title\"" . ($img->class ? " class=\"$img->class\"" : '') . " />", "node/$img->nid");
---
>   return l(
> 		   '<img src="' . ($img->width || $img->height ? url("image/view/$img->nid", 'res=' . $img->width . "x$img->height") : "files/$img->filepath") . '"' . ($img->width ? " width=\"$img->width\"" : '') . ($img->height ? " height=\"$img->height\"" : NULL) . ($img->align ? " align=\"$img->align\"" : '') . ($img->border ? " border=\"$img->border\"" : '') . ($img->hspace ? " hspace=\"$img->hspace\"" : '') . ($img->vspace ? " vspace=\"$img->vspace\"" : '') . " alt=\"$img->title\"" . ($img->class ? " class=\"$img->class\"" : '') . " />", "node/$img->nid", NULL, NULL, NULL, FALSE, TRUE);
