Strongarm allows you to version control the variables table. However, since Boost define's constants from its variables, Strongarm never has a chance to override them. See #661442: Document variables that are used before hook_init().

I see two solutions:

1) Don't use constants for variables. define() names a "constant", and by definition, constants are unchanging. Variables are "variable", thus, they can/should be changed.

2) Define the constants after Strongarm has a chance to override the variables table, which is does in hook_init().

Thoughts?

CommentFileSizeAuthor
#4 boost.patch6.16 KBjoelstein

Comments

mikeytown2’s picture

It's old cruft from the 4.7 version of boost
#668414: Use more variable_get, less define.
It's something I want to do. Will take a lot of effort and might require the change to be in a boost 2.0
The 7.x port will use variable_get though.

joelstein’s picture

Would you like some help? I can do some global find and replace. Do you want to use variable_get(), or $GLOBALS['conf'] (I don't really understand the latter).

mikeytown2’s picture

variable_get if the preferred way. For things that might get set dynamically; $GLOBALS['conf'] is useful. To make this "backwards compatible" (and thus not requiring a new major version #) we have to keep both but only use variable_get in the function calls. Pick a section of variables and go from there; doing all at once will be hard for me to review.

joelstein’s picture

Status: Active » Needs review
StatusFileSize
new6.16 KB

Okay, here's the first patch. I only tackled two constants for now, to make sure this is an effective way to move forward. Let me know your thoughts.

mikeytown2’s picture

Status: Needs review » Fixed

committed

Status: Fixed » Closed (fixed)

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