You are here

function webform_update_7425 in Webform 7.4

Add "exclude empty" option to emails.

File

./webform.install, line 2240
Webform module install/schema hooks.

Code

function webform_update_7425() {

  // Add next_serial column to webform.
  $spec = array(
    'description' => 'Determines if the e-mail will include component with an empty value.',
    'type' => 'int',
    'unsigned' => TRUE,
    'size' => 'tiny',
    'not null' => TRUE,
    'default' => 0,
  );
  if (!db_field_exists('webform_emails', 'exclude_empty')) {
    db_add_field('webform_emails', 'exclude_empty', $spec);
  }

  // Clear the views cache since this release use the webform_analysis view.
  cache_clear_all('*', 'cache_views', TRUE);
  return t('Webform e-mails were sucessfully updated to add the option to exclude empty components.');
}