You are here

function webform_uninstall in Webform 6.2

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.3 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()

Implementation of hook_uninstall().

File

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

Code

function webform_uninstall() {

  // Unset webform variables.
  variable_del('webform_use_cookies');
  variable_del('webform_debug');
  variable_del('webform_enable_fieldset');
  variable_del('webform_default_from_address');
  variable_del('webform_default_from_name');
  variable_del('webform_default_subject');
  variable_del('webform_csv_delimiter');
  $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');
}