--- modules/image_filter.module	Wed Jan  5 15:10:37 2005
+++ modules/x/image_filter.module	Tue Dec 14 04:00:11 2004
@@ -61,7 +61,7 @@
   // *** Original syntax: [image:NID,(left|center|right)] ***
   // First we find every tag.
 
-  if (preg_match_all("/\[image:(\d+)(,(left|right|top|middle|bottom|absmiddle|texttop|baseline))?(,(\d+))?(,(\d+))?(,(\d+))?(,(.+))?(,(.+))\]/i", $text, $match)) {
+  if (preg_match_all("/\[image:(\d+)(,(left|right|top|middle|bottom|absmiddle|texttop|baseline))?(,(\d+))?(,(\d+))?(,(\d+))?\]/i", $text, $match)) {
 
     // Then we make the html.
 
@@ -97,6 +97,7 @@
   // *** New syntax: [image:node_id (left|right|top|middle|bottom|absmiddle|texttop|baseline) hspace=n vspace=n border=n width=n height=n]
 
   if (preg_match_all('/\[image:(\d+)\w?(.*?)?\]/i', $text, $match)) {
+
     // Then we make the html.
 
     foreach ($match[1] as $key => $value) {
@@ -120,11 +121,8 @@
       $img->width = $m[1];
       preg_match("/height=\"?(\d+)\"?/i", $match[2][$n], $m);
       $img->height = $m[1];
-      preg_match("/class=\"?(.+)\"?/i", $match[2][$n], $m);
-      $img->class = $m[1];
-      preg_match("/style=\"?(.+)\"?/i", $match[2][$n], $m);
-      $img->style = $m[1];
       $match[10][$n] = theme("image_inline_img", $img);
+
     }
 
     // PHP (4.3.2) str_replace appears to use some internal order
@@ -150,7 +148,7 @@
  */
 function theme_image_inline_img($img) {
   global $base_url;
-  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\"" : '') . ($img->class ? " class=\"$img->class\"" : '') . ($img->style ? " style=\"$img->style\"" : '') . " alt=\"$img->title\" />", "node/$img->nid") ;
+  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\" />", "node/$img->nid");
 }
 
 ?>
