Trivial patch. There was a spelling mistake in one of the comments for db_distinct_field():

 * @param $table Unused. Kept to remain API compatibility.
 * @param $field Unused. Kept to remain API compatibility.

changed to:

 * @param $table Unused. Kept to retain API compatibility.
 * @param $field Unused. Kept to retain API compatibility.

Notice 'remain' vs. 'retain'. RTBCing myself since the patch is trivial.

Comments

mr.baileys’s picture

Component: database system » documentation
Status: Reviewed & tested by the community » Needs review

RTBCing myself since the patch is trivial.

Nope, that's not how it works ;)

Moving to the documentation queue.

jhodgdon’s picture

Status: Needs review » Needs work

The text changes are good... but after the patch, this function doc is still wrong.

I hate to have patches that leave errors in doc headers.

So could you kindly reformat the function doc according to http://drupal.org/node/1354#functions

Thanks...

jhodgdon’s picture

Issue tags: +Novice

This would be a good novice project...

rdrh555’s picture

Assigned: Unassigned » rdrh555
Status: Needs work » Needs review
StatusFileSize
new3.75 KB

I fixed the entire file (hopefully) to conform (besides db_distinct_field()), i.e., inserting blank lines above @return in functions, etc. I double checked for trailing white space in vi, however, I am not real confident. It's highlighting lines that I didn't even touch.....maybe this is ok

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Nice work, thanks!

mr.baileys’s picture

Status: Reviewed & tested by the community » Needs work

Thanks for taking this one on rdrh555!

Just one minor thing that needs correcting:

+++ includes/database.inc	9 Jul 2010 17:12:41 -0000
@@ -307,8 +310,10 @@
+ * To be used for for listing queries. Do not use FROM table1, table2 syntax,

One "for" too many

42 critical left. Go review some!

Edit: typo

rdrh555’s picture

Status: Needs work » Needs review
StatusFileSize
new3.74 KB

Ahh, yes--thanks mr.baileys! Here's the fix:

mr.baileys’s picture

Looks good to me. I hate to do it, but would you mind fixing the return value in update_sql too?

 * An array containing the keys:
 *   success: a boolean indicating whether the query succeeded
 *   query: the SQL query executed, passed through check_plain()
*/ 

This should be a proper Doxygen list as per http://drupal.org/node/1354#lists

jhodgdon’s picture

Good point mr.baileys - thanks for your careful reviews. If you're making one more patch:

Rewrites node, taxonomy and comment queries.

Our documentation writing style standards require a comma before the and here:
http://drupal.org/node/338208#english
So it should be
node, taxonomy, and comment queries.

rdrh555’s picture

StatusFileSize
new4.01 KB

Argh! I thought I put the comma in. Thanks for the reviews and this should do it!

jhodgdon’s picture

I don't see any problems now. mr.baileys?

mr.baileys’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me too, thanks rdrh555!

jhodgdon’s picture

Status: Reviewed & tested by the community » Needs review

Actually... Have these changes been made in the D7 version of database.inc? The patch went way beyond the scope of the original issue. If not, we should fix in D7 before patching D6.

rdrh555’s picture

StatusFileSize
new1.59 KB

db_distinct_field only patch:

jhodgdon’s picture

Status: Needs review » Needs work

Typo (queryand):
+ * Adds the DISTINCT flag to the supplied queryand returns the altered query.

rdrh555’s picture

Status: Needs work » Needs review
StatusFileSize
new1.59 KB
jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Looks fine now, thanks!

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed.

Status: Fixed » Closed (fixed)
Issue tags: -Novice

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