Files: 
CommentFileSizeAuthor
#12 db_set_active_doc_issues-4598096-12.patch706 bytesbarbi
PASSED: [[SimpleTest]]: [MySQL] 190 pass(es).
[ View ]
#6 db_set_active_doc_issues-4598096-6.patch705 bytesbarbi
PASSED: [[SimpleTest]]: [MySQL] 190 pass(es).
[ View ]

Comments

[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:

<?php
$db_url
= array(
 
'default' => 'mysql://username:password@localhost/drupal_database',
 
'thirdparty' => 'mysql://username1:password1@localhost/other_database'
 
);
?>

In the above sample from settings.php, the "name" would be either 'default' or 'thirdparty'.

Issue tags:+Novice

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

Title:Documentation problem with db_set_activedb_set_active doc issues

It would be great if the @return was fixed up too. non -> none, and needs to start with a capital letter.

Just marked
#725856: db_set_active() documentation fix . . .
as a duplicate of this issue. It's about the @return section.

sub

Assigned:Unassigned» barbi
Status:Active» Needs review
StatusFileSize
new705 bytes
PASSED: [[SimpleTest]]: [MySQL] 190 pass(es).
[ View ]

Status:Needs review» Needs work

Close!

+ * 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. :)

Thank you, doc team! These little improvements make a big difference.

Another report of confusion on this function - should verify this fixes their doc issue too:
#1184106: db_set_active doc issues

@jhodgdon, that links back to this same issue..

Status:Needs work» Needs review
StatusFileSize
new706 bytes
PASSED: [[SimpleTest]]: [MySQL] 190 pass(es).
[ View ]

Status:Needs review» Reviewed & tested by the community

That looks fine to me - thanks!

Status:Reviewed & tested by the community» Fixed

Thanks, committed.

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