I think that line 678:

$output .= theme('search_item', $entry, $type);

should be

$output .= theme('search_item', $entry, $entry['type']);

so that hook_search_item is in fact invoked for the particular entry's module type.

CommentFileSizeAuthor
#1 search_item.path749 bytesRobrecht Jacques

Comments

Robrecht Jacques’s picture

StatusFileSize
new749 bytes

Playing patch bingo.

I'm not sure if what adixon says is correct, but I've rerolled the path. Looks like a sensible thing to do, but I'm not sure how to test it as I haven't used search.module before.

Steven’s picture

Status: Needs review » Closed (won't fix)

This patch is not really a good idea for two reasons:

  • $entry['type'] is already available through $entry, so it does not make sense to pass it again.
  • $type refers to the module that provides the search (node.module). $entry['type'] is not set for e.g. user search.

Regardless, you are free to do what you want in theme_search_item(), by overriding it in your own theme.