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.

Files: 
CommentFileSizeAuthor
#3 correct-spelling-1309750-3.patch543 byteskiamlaluno
PASSED: [[SimpleTest]]: [MySQL] 33,328 pass(es).
[ View ]
#1 correct-spelling-1309750-1.patch1.05 KBkiamlaluno
PASSED: [[SimpleTest]]: [MySQL] 33,316 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new1.05 KB
PASSED: [[SimpleTest]]: [MySQL] 33,316 pass(es).
[ View ]

This is not what I meant with "very shortly." I had to take care of family things. :-)

Thanks 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".

StatusFileSize
new543 bytes
PASSED: [[SimpleTest]]: [MySQL] 33,328 pass(es).
[ View ]

This 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() and search_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.)

Status:Needs review» Reviewed & tested by the community
Issue tags:+Quick fix, +needs backport to D7

This patch is fine, thanks!

Status:Reviewed & tested by the community» Fixed

Committed to 7.x and 8.x. Thanks!

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