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.
There is no documentation about the $table parameter of db_table_exists() function.
It is a string, and the value should be the name of the database table.
Comment | File | Size | Author |
---|---|---|---|
#6 | database-db_table_exists-documentation-986682.patch | 3.67 KB | pkiraly |
#4 | database-db_table_exists-documentation-986682.patch | 3.65 KB | pkiraly |
Comments
Comment #1
jhodgdonGood catch! That's true for all three versions of db_table_exists() in Drupal 6. They're listed here:
http://api.drupal.org/api/search/6/db_table_exists
They are also missing @return sections, and their first lines are not starting with a verb in the right tense, so they all need a bit of clean-up.
Drupal 7 is fine.
Good project for a new doc contributor I think...
Comment #2
pkiraly CreditAttribution: pkiraly commentedHi,
is there a starting guide for new doc contributors?
Comment #3
jhodgdonYes, thanks for asking!
http://drupal.org/node/144223
That should get you started, and/or point you to additional help on: how to set up a development environment, check out Drupal from CVS, figure out where the doucumentation is that you want to fix, and make a patch.
If you need further help, please ping me on IRC
http://drupal.org/irc
I'm usually in #drupal-docs and #drupal-contribute
Comment #4
pkiraly CreditAttribution: pkiraly commentedI have created a patch for this problem. It covers both 3 files (includes/database.pgsql.inc, includes/database.mysql.inc, includes/database.mysqli.inc), which contains this problem. I also added documentation for the db_column_exists() function.
Comment #5
jhodgdonThat's a good start, but it needs a little bit of work.
a) We have some standards about how to document functions:
http://drupal.org/node/1354
- Start with verb in 3rd person (checks vs. check).
- Blank line between @param and @return sections.
- @param descriptions and @return descriptions should end in "."
b) I think the return value for the column_exists functions is true/false based on whether the column exists, not the table?
Comment #6
pkiraly CreditAttribution: pkiraly commentedHi Jennifer,
thanks for your comments. I modified the patch according to your suggestions, except the first one. I did not modify the descriptions, just add some parameteres and return values. All database files' function descriptions use "check" style verb instead of 3rd person formulation ("Lock a table.", "Unlock all locked tables.", "Prepare user input for use in a database query...." etc.). I guess it would be another issue.
Péter
Comment #8
jhodgdonYou are correct -- D6 doesn't follow the verb tense standards very well, and I guess it is OK to leave these as-is. Normally, when people are editing the doc for a particular function, I try to get them to bring the entire function doc up to standards, but this patch is OK as is, and adds some needed documentation.
Ignore the test failure above. This is a known problem with the testing system. The patch applies fine, and thanks for contributing!
Comment #9
Gábor HojtsyThanks, committed.