Index: includes/theme.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.231
diff -u -F^function -r1.231 theme.inc
--- includes/theme.inc	30 Apr 2005 17:47:57 -0000	1.231
+++ includes/theme.inc	2 May 2005 16:01:33 -0000
@@ -449,15 +449,21 @@ function theme_links($links, $delimiter 
  * @param $title
  *   The title text is displayed when the image is hovered in some popular browsers.
  * @param $attr
- *   Attributes placed in the img tag.
+ *   Attributes placed in the img tag. Can either be a string or an associative array such as array('align'=>'left', 'border'=>1)
  * @param $getsize
  *   If set to true, the image's dimension are fetched and added as width/height attributes.
  * @return
  *   A string containing the image tag.
  */
-function theme_image($path, $alt = '', $title = '', $attr = '', $getsize = true) {
-  if (!$getsize || (file_exists($path) && (list($width, $height, $type, $attr) = @getimagesize($path)))) {
-    return "<img src=\"$path\" $attr alt=\"$alt\" title=\"$title\" />";
+function theme_image($path, $alt = '', $title = '', $attr = NULL, $getsize = true) {
+  if (!$getsize || (file_exists($path) && (list($width, $height, $type, $imgattr) = @getimagesize($path)))) {
+    if (is_array($attr)) {
+      foreach ($attr as $key => $val) {
+        $temp .= "$key = \"$val\" ";
+      }
+      $attr = trim($temp);
+    }
+    return "<img src=\"$path\" alt=\"$alt\" title=\"$title\" $imgattr $attr />";
   }
 }
 
