Recently changes in node hooks missed changing search module code documentation.

Attached patch correct this, but may not be perfect.

Comments

cburschka’s picture

Status: Needs review » Reviewed & tested by the community

That seems to cover it.

Good call on removing "hook_search_item". I've searched the API and the code extensively and found that not only is this hook not documented, it also isn't called. That line is the only occurrence of "search_item" anywhere in Drupal 7. :)

dries’s picture

Committed to CVS HEAD. Thanks!

cburschka’s picture

Version: 7.x-dev » 6.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

hook_search_item didn't exist in Drupal 6 either.

*Or* in Drupal 5.

*Or* in Drupal 4.7.

For giggles, I grepped through all our major releases and head to go all the way back to Drupal 4.6 to find module_invoke($type, 'search_item');. Talk about a blast from the past. :)

jhodgdon’s picture

Component: search.module » documentation

This still needs to be fixed in Drupal 6:
http://api.drupal.org/api/group/search/6

rdrh555’s picture

Assigned: Unassigned » rdrh555
Status: Patch (to be ported) » Needs review
StatusFileSize
new1.61 KB
jhodgdon’s picture

Status: Needs review » Needs work

Please check this over. I think some of the changes in this patch are D6->D7 patches. For instance, in D6 we still use hook_nodeapi, where in D7 this was changed to a variety of different hooks.

rdrh555’s picture

Oh, I changed the $op parameters into functions (like D7), but should have left them alone. The D6 issue is on: removing "hook_search_item"
and
"implement nodeapi('update index') and nodeapi('search result')"
should perhaps be
"implement hook_nodeapi('update index') and hook_nodeapi('search result')"?
Am I close?

jhodgdon’s picture

Yes, that's what needs to be done.

rdrh555’s picture

Status: Needs work » Needs review
StatusFileSize
new1.7 KB

Great. *Note -I didn't want to wrap the functions on 2 lines, thus the shorter 'Specifically...' line. Hope that's acceptable.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Looks good, thanks.

jhodgdon’s picture

Status: Reviewed & tested by the community » Needs work

Oops, spoke to soon - patch needs to be rerolled from Drupal root

rdrh555’s picture

Status: Needs work » Needs review
StatusFileSize
new1.74 KB
jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

That's better, thanks!

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.