The intention of webform_variable_get is to consolidate the calls to variable_get so that the defaults are in only one place. It also provides a central listing to refer to for variable_del (although I hate the duplication of code).
The following variables are/were not centralized:
webform_blocks
webform_tracking_mode
webform_search_index
webform_email_address_format
webform_default_format
webform_format_override
webform_email_select_max
webform_excel_legacy_exporter
webform_submission_access_control
webform_update_batch_size
webform_disabled_components
This is a big patch, which was created mostly with cut/paste/replace. Still, it is difficult to thoroughly test every option, so I've relied in part on a careful review of the patch. I welcome additional testing.
Comment | File | Size | Author |
---|---|---|---|
#1 | webform-inconsistent_use_of-2414543-1.patch | 21.39 KB | DanChadwick |
Comments
Comment #1
DanChadwick CreditAttribution: DanChadwick commentedI also reconciled the calls to variable_del to match, and found at least one that was missing.
Committed to 7.x-4.x. Given that config is totally different in 8.x, I don't think there is an up-port needed.
Comment #4
fenstratThis needs porting to D8, mainly to ensure webform.setting.yml, webform.schema.yml and webform_uninstall() have the same list of variables as 7.x.
Comment #6
fenstratCommitted and pushed to 8.x-4.x.
I kept the webform_variable_get() calls for the moment, again just for consistency, but that function will be on the chopping block soon. I left out the legacy webform_table variable as I foresee dropping the legacy hardcoded tables and only allowing the newer views versions.