Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Various functions in the search API use $type and $module interchangeably, and refer to "search types" and "search modules" interchangeably.
Since hook_search_info()/hook_search_execute() for Drupal 7 still only supports one search type per module, pwolanin and I agree that we should standardize on $module.
This is just an API doc fix, and changing the names of function args, so it shouldn't affect functionality, strings, etc. But it would be good to do before the D7 release.
Comment | File | Size | Author |
---|---|---|---|
#9 | 0001-Search-API-is-inconsistent-in.patch | 18.79 KB | marvil07 |
#5 | 827116.patch | 19.29 KB | jhodgdon |
Comments
Comment #1
pwolanin CreditAttribution: pwolanin commentedyes, yes, yes
Comment #2
Damien Tournoud CreditAttribution: Damien Tournoud commentedSounds like a good idea to me.
Comment #3
jhodgdonJust as a note, we'd like to wait for #567100: Search module is assuming node is default search even when it's disabled to land before attacking this one.
Comment #4
jhodgdonWorking on a patch...
Comment #5
jhodgdonUh oh. Never let jhodgdon get into a clean-up issue... This patch got a bit large, but the doc headers for the search module were in rather a mess. This patch fixes them up considerably.
Note that I left the search_expression_insert/extract functions alone, as they are being addressed in another issue.
Comment #6
pwolanin CreditAttribution: pwolanin commentedI'm tempted to suggest we should postpone this until we get any actual bug/functional fixes in.
Comment #7
pwolanin CreditAttribution: pwolanin commentedargh - damn Firefox form handling
Comment #8
jhodgdonThe actual fixes could take weeks/months to get in. I'm tired of postponing everything...
Comment #9
marvil07 CreditAttribution: marvil07 commentedAs some strings got in in other patches, patch in #5 do not apply cleanly anymore, so I just removed the stuff that already got it.
Comment #10
jhodgdon#9: 0001-Search-API-is-inconsistent-in.patch queued for re-testing.
Comment #11
jhodgdonJust as a note, I actually wrote the original to the patch in #9, so if someone else could review it, that would be helpful. It's all documentation though (no code changes except changing names of local variables), so it can wait until a less frantic time.
Comment #12
pwolanin CreditAttribution: pwolanin commentedBasically looks good, though this line suggests there might be some more cleanup to do inside the test class:
Comment #13
jhodgdonI don't think we can do anything about that line. Here's the context:
I really don't want to change the APIs at this point (except for local variable and param names, which have no real effect on the API or code). This is inside the search query extender class, and the variable was called $type a long time ago, and I don't think we should go back and change it now.
Comment #14
pwolanin CreditAttribution: pwolanin commentedOk, well otherwise as you says this is low-risk renaming.
Comment #15
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.