The hook_search documentation for versions 5.x and 6.x are incorrect.

http://api.drupal.org/api/function/hook_search/5

http://api.drupal.org/api/function/hook_search/6

I have documented what I found here: http://drupal.org/node/271392

  • node_access_join_sql() and node_access_where_sql() no longer exist
  • AND not necessary in $join sql statement
  • check_outputdeprecated since Drupal 4.7.

And, the code, even when fixed, doesn't work. At least, I've not been able to get it to work. Hopefully I'm wrong, but it seems like an incredible oversight and I can't believe no one else has discovered it until now.

Comments

Steven Jones’s picture

Component: Misc » Documentation in CVS
Priority: Critical » Normal

The example code is wrong. Is the doxygen comment incorrect too?

mfb’s picture

This documentation dates from Oct 31, 2004: http://cvs.drupal.org/viewvc.py/drupal/contributions/docs/developer/hook... at which time it was lifted from the current state of node_search(): http://cvs.drupal.org/viewvc.py/drupal/drupal/modules/node.module?revisi...

So yeah it's about time for the documentation to get updated again and for now you could look at node_search() for a working example.

Barry Madore’s picture

Project: Documentation » Drupal core
Version: » 7.x-dev
Component: Documentation in CVS » documentation

Moving

bdragon’s picture

Synced DRUPAL-5, DRUPAL-6--1, and HEAD with the respective node_search() function bodies.

bdragon’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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