Index: imagefield.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/imagefield/imagefield.module,v
retrieving revision 1.99
diff -u -p -r1.99 imagefield.module
--- imagefield.module	20 Apr 2009 23:57:17 -0000	1.99
+++ imagefield.module	15 Jun 2009 20:15:46 -0000
@@ -126,6 +126,33 @@ function imagefield_file_download($filep
 }
 
 /**
+* Implementation of hook_nodeapi()
+*/
+function imagefield_nodeapi($node, $op) {
+  if ($op == 'update index') {
+    static $fields;
+    if (is_null($fields)) {
+      // Grab the fields definition since we may need it repeatedly.
+      $fields = content_fields(NULL, $node->type);
+    }
+    $texts = array();
+    foreach ($fields as $field) {
+      if ($field['widget']['module'] == 'imagefield') {
+        $name = $field['field_name'];
+        // Find out if this node has imagefields.
+        if ($node->{$name}) {
+          foreach ($node->{$name} as $image) {
+            $texts[] = isset($image['data']['alt']) ? $image['data']['alt'] : '';
+            $texts[] = isset($image['data']['title']) ? $image['data']['title'] : '';
+          }
+        }
+      }
+    }
+    return implode(' ', $texts);
+  }
+}
+
+/**
  * Implementation of CCK's hook_widget_info().
  */
 function imagefield_widget_info() {
