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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DanChadwick’s picture

Status: Active » Fixed
FileSize
21.39 KB

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

  • DanChadwick committed d9e6dbc on 7.x-4.x
    Issue #2414543 by DanChadwick: Inconsistent use of webform_variable_get
    

Status: Fixed » Closed (fixed)

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

fenstrat’s picture

Version: 7.x-4.x-dev » 8.x-4.x-dev
Status: Closed (fixed) » Patch (to be ported)

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

  • fenstrat committed 78ae969 on 8.x-4.x
    Issue #2414543 by fenstrat: Ensure variables match those in the 7.x-4.x...
fenstrat’s picture

Status: Patch (to be ported) » Fixed

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

  • fenstrat committed bb4aeb7 on 8.x-4.x
    Issue #2414543 by fenstrat: Follow up, fix syntax of webform.schema.yml.
    

Status: Fixed » Closed (fixed)

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