You are here

function s3fs_uninstall in S3 File System 7.3

Same name and namespace in other branches
  1. 7 s3fs.install \s3fs_uninstall()
  2. 7.2 s3fs.install \s3fs_uninstall()

Implements hook_uninstall().

File

./s3fs.install, line 133
Install, update and uninstall functions for the S3 File System module.

Code

function s3fs_uninstall() {

  // Load our module file, since s3fs is current disabled.
  drupal_load('module', 's3fs');

  // Remove all the s3fs settings variables.
  foreach (_s3fs_get_config() as $key => $value) {
    variable_del("s3fs_{$key}");
  }

  // Remove 's3' from the list of public file schemas.
  $public_schema = variable_get('file_public_schema');
  if (is_array($public_schema) && in_array('s3', $public_schema)) {
    $public_schema = array_diff($public_schema, array(
      's3',
    ));
    variable_set('file_public_schema', $public_schema);
  }
}