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:20:14 -0000
@@ -126,6 +126,35 @@ function imagefield_file_download($filep
 }
 
 /**
+* Implementation of hook_nodeapi()
+*/
+function imagefield_nodeapi($node, $op) {
+  if ($op == 'update index') {
+    static $fields;
+    if (is_null($fields)) {
+      // Filter and store the fields definition since we may need it repeatedly.
+      foreach (content_fields(NULL, $node->type) as $field) {
+        if ($field['widget']['module'] == 'imagefield') {
+          $fields[] = $field;
+        }
+      }
+    }
+    $texts = array();
+    foreach ($fields as $field) {
+      $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() {
