Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
API page: http://api.drupal.org/api/drupal/modules--search--search.api.php/functio...
The documentation page contains a typo: It says, "doesn't ues" instead of "doesn't use." It also misses an article.
I will provide a patch very shortly.
Comment | File | Size | Author |
---|---|---|---|
#3 | correct-spelling-1309750-3.patch | 543 bytes | apaderno |
#1 | correct-spelling-1309750-1.patch | 1.05 KB | apaderno |
Comments
Comment #1
apadernoThis is not what I meant with "very shortly." I had to take care of family things. :-)
Comment #2
jhodgdonThanks for the spelling correction.
I'm not sure I agree with inserting "the" there though. I would say things like "Use function abc() to do x" not "Use the function abc() to do x". Isn't method pretty much the same word as function, but in a class? So I would say "Use method abc() to do x" also... and in this case, "Add the main keywords to the query by using method search_index()" seems fine to me without "the".
Comment #3
apadernoThis patch only fixes the typo.
I added the article for consistency with the other sentence, "The functions search_expression_extract() and search_expression_insert() may also be helpful for adding custom search parameters to the search expression." I guess that using the article depends on how much definite is the method being mentioned. Is the method defined by a class that implements an interface, or is it the method defined by a specific class?
To me, "use function abc()" sounds like it is missing the article, and it sounds like saying "use coffee" instead of "use the coffee you find on the counter"; both are valid, but the latter is referring to specific coffee (i.e., it's not the coffee that you find in another place).
This is secondary, though. We could also argue that the other sentence can be simply written "search_expression_extract() and search_expression_insert() may also be helpful for adding custom search parameters to the search expression," as it should be implicit that
search_expression_extract()
andsearch_expression_insert()
are functions, and not methods. (It is implicit by the name, and for the fact I don't write "the methods" before them.)Comment #4
jhodgdonThis patch is fine, thanks!
Comment #5
Dries CreditAttribution: Dries commentedCommitted to 7.x and 8.x. Thanks!