Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
9 Jun 2011 at 21:59 UTC
Updated:
4 Jan 2014 at 00:53 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
aquariumtap commented[my original message seems to have been lost by using "preview"... here it is below]
It's unclear what "name" is, or where it's defined.
The answer: by default, the variable $db_url in settings.php is a single connection string. When multiple databases are configured, those strings are placed inside of an array. The key to each value is the "name".
For example:
In the above sample from settings.php, the "name" would be either 'default' or 'thirdparty'.
Comment #2
jhodgdonThanks for reporting!
This is a d6-specific bug. In D7 it is documented more clearly (the parameter is called $key and it's documented what it's an array key to).
So we should say that $name is a key into the $db_url global variable from settings.php. Good project for a novice doc contributor...
Comment #3
jhodgdonIt would be great if the @return was fixed up too. non -> none, and needs to start with a capital letter.
Comment #4
jhodgdonJust marked
#725856: db_set_active() documentation fix . . .
as a duplicate of this issue. It's about the @return section.
Comment #5
barbi commentedsub
Comment #6
barbi commentedComment #7
jhodgdonClose!
+ * The name of the previously active database or FALSE if None was found.
I think this needs a comma before the or, and None should not be capitalized. Sorry if my note about capital letters above confused you -- I meant the @return description needs to start with a capital letter, not the word none. :)
Comment #8
aquariumtap commentedThank you, doc team! These little improvements make a big difference.
Comment #9
jhodgdonAnother report of confusion on this function - should verify this fixes their doc issue too:
#1184106: db_set_active doc issues
Comment #10
aquariumtap commented@jhodgdon, that links back to this same issue..
Comment #11
jhodgdonwhoops.
#1189212: Documentation problem with db_set_active
Comment #12
barbi commentedComment #13
jhodgdonThat looks fine to me - thanks!
Comment #14
gábor hojtsyThanks, committed.