Closed (fixed)
Project:
Drupal core
Version:
4.6.5
Component:
search.module
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
2 Jan 2006 at 10:01 UTC
Updated:
19 Jan 2006 at 23:20 UTC
Jump to comment: Most recent file
To my eyes, it seems that the $type parameter is completely ignored in the do_search function, thus rendering search functionality severely crippled, especially when dealing with modules that implement their own search. This patch adds the "where type = '%s'", $type bit to the SQL for gathering search results.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | search_do_search_0.patch | 933 bytes | robertdouglass |
| search_do_search.patch | 1.33 KB | robertdouglass |
Comments
Comment #1
robertdouglass commentedoops... patch without Eclipse project info =)
Comment #2
oadaeh commentedForgive my ignorance with the underpinnings of Drupal, but is there ever a time when $type might be null or ==""? If so, then there should probably be a check for that before inserting it into the SQL statement.
Comment #3
robertdouglass commentedTheoretically it isn't possible, since $type is a required parameter of the function. That said, if some code has been calling do_search with $type = '', nothing bad would have happened, and that code would break. This is to be desired, however, since the calling code doesn't conform to the published API. I don't believe this happens anywhere in core.
Comment #4
Steven commentedGood catch... I noticed this when doing 4.7 search, but never got around to backporting it to 4.6. Note that the doxygen also needed to be updated.
Committed to 4.6.
Comment #5
(not verified) commented