Comments

add1sun’s picture

Project: Documentation » Drupal core
Version: » 7.x-dev
Component: Correction/Clarification » documentation

moving to correct queue

matason’s picture

Looking at the documentation for other globals it seems to be quite concise so here's my first attempt at describing $conf

$conf is... "An array of key/value pairs generated in bootstrap.inc from 'Variable overrides' in settings.php and name/value data from the 'variable' table."

Should we mention anything about the related functions variable_get(), variable_set() and variable_del()?

cwgordon7’s picture

Mentioning the related functions sounds like a good idea. Patch coming? :)

matason’s picture

Okay, will add that tomorrow, quite tired now!

I believe I need a CVS account to checkout the right file to patch against - see http://drupal.org/node/252375 where I was trying to help with a similar issue.

I applied for a CVS account over 2 weeks ago but am still waiting for a reply so maybe I'll write this up and someone else can actually make the patch.

Thanks for the input, appreciated!

Chris

add1sun’s picture

@matason, well you can create a patch without a CVS account. You only need the account to *commit* the change. If you supply a patch someone else with commit access can add it.

jeffschuler’s picture

Assigned: Unassigned » jeffschuler
jeffschuler’s picture

Assigned: jeffschuler » Unassigned
Status: Active » Needs review
StatusFileSize
new587 bytes

Patch to document global $conf as:

"Associative array (name/value) of persistent variables stored in 'variables' table. Use variable_get(), variable_set(), and variable_del() to access."

I thought it unnecessary to include mention of variable overrides in settings.php.

Thanks @matason!

Status: Needs review » Needs work

The last submitted patch failed testing.

jeffschuler’s picture

Status: Needs work » Needs review
StatusFileSize
new595 bytes

Created a new patch to (hopefully) fix previous failed one.

I had originally checked out from:
/cvs/drupal/contributions/docs/developer
...I've changed to:
/cvs/drupal-contrib/contributions/docs/developer

cwgordon7’s picture

Status: Needs review » Reviewed & tested by the community

Looks pretty good! Assuming the patch now applies, rtbc.

Status: Reviewed & tested by the community » Needs work

The last submitted patch failed testing.

jeffschuler’s picture

Status: Needs work » Needs review
StatusFileSize
new595 bytes

DavidStrauss suggested a solution here to append ".txt" to the patch filename -- to trick the testbed into not testing this patch against core, (since it's really just part of docs/developer.)

I'm doing so, but is there a better way?

boombatower's blog post, Testing.drupal.org is running!, suggests that patches for component documentation should be ignored, but I don't see an issue posted, (at a glance.)

cwgordon7’s picture

Status: Needs review » Reviewed & tested by the community

Awesome, cool, rtbc. :)

Status: Reviewed & tested by the community » Needs work

The last submitted patch failed testing.

cwgordon7’s picture

Status: Needs work » Reviewed & tested by the community

Uh, testing bot, stop it. (Trying again,,,)

sun’s picture

Status: Reviewed & tested by the community » Needs work
 /**
- * The path to the configuration directory as set by conf_path().
+ * Associative array (name/value) of persistent variables stored in 'variables'
+ * table. Use variable_get(), variable_set(), and variable_del() to access.
  */

PHPDoc summaries must not be wrapped. Everything starting from "Use ..." belongs to the PHPDoc description and thus needs a blank line to separate the description from the summary. On that note, @see would be much cleaner instead of that second sentence.

jeffschuler’s picture

Status: Needs work » Needs review
StatusFileSize
new571 bytes

Understood; thank you, sun. Modified to follow your recommendations.

And naming file as ".txt" (without ".diff" this time) in hopes that testing bot ignores.

sun’s picture

Your patch should end in .patch (as extension).

From the description: "only files ending in .patch or .diff will be sent for testing! For patches that apply specifically to Drupal 5 or Drupal 6, you can prefix the extension with -D5 or -D6 to prevent them from being queued for testing. For example, foo.patch and bar.diff would both be queued for testing, whereas foo-D5.patch and bar-D6.diff would not be queued for testing."

All patches for Drupal core (HEAD) need to pass tests.

jeffschuler’s picture

StatusFileSize
new571 bytes

I'm resubmitting as .diff, but this patch is not for HEAD -- it's for the developer docs.

The reason I don't want the testing bot to run it is because it thinks this is part of HEAD and fails applying the patch, (please see #8, #10, #13.)

Am I misunderstanding something?

Status: Needs review » Needs work

The last submitted patch failed testing.

sun’s picture

Status: Needs work » Reviewed & tested by the community

Oh, sorry, I did not realize that this patch does not touch the actual code-base.

Fixes look good.

dries’s picture

This isn't a D7 core patch ...

cha0s’s picture

Status: Reviewed & tested by the community » Fixed

webchick requested that I commit these fixes, so I have committed the changes to 6 and 7.

Status: Fixed » Closed (fixed)

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

Alexandros78’s picture

It would also be nice to know what $conf includes (which are its elements).

Similar to the list provided for the $user object:
http://api.drupal.org/api/drupal/developer--globals.php/global/user/6