You are here

function webform_uninstall in Webform 6.3

Same name and namespace in other branches
  1. 8.5 webform.install \webform_uninstall()
  2. 5.2 webform.install \webform_uninstall()
  3. 5 webform.install \webform_uninstall()
  4. 6.2 webform.install \webform_uninstall()
  5. 7.4 webform.install \webform_uninstall()
  6. 7.3 webform.install \webform_uninstall()
  7. 6.x webform.install \webform_uninstall()

Implements hook_uninstall().

File

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

Code

function webform_uninstall() {

  // Unset webform variables.
  variable_del('webform_node_types');
  variable_del('webform_node_types_primary');
  variable_del('webform_disabled_components');
  variable_del('webform_use_cookies');
  variable_del('webform_default_from_address');
  variable_del('webform_default_from_name');
  variable_del('webform_default_subject');
  variable_del('webform_default_format');
  variable_del('webform_format_override');
  variable_del('webform_csv_delimiter');
  variable_del('webform_allowed_tags');
  variable_del('webform_blocks');
  variable_del('webform_search_index');
  variable_del('webform_email_address_format');
  variable_del('webform_export_format');
  variable_del('webform_submission_access_control');
  variable_del('webform_update_batch_size');
  $component_list = array();
  $path = drupal_get_path('module', 'webform') . '/components';
  $files = file_scan_directory($path, '^.*\\.inc$');
  foreach ($files as $filename => $file) {
    variable_del('webform_enable_' . $file->name, 1);
  }

  // Delete uploaded files.
  $filepath = file_create_path('webform');
  _webform_recursive_delete($filepath);

  // Drop tables.
  drupal_uninstall_schema('webform');
}