You are here

function media_acquiadam_uninstall in Media: Acquia DAM 7

Implements hook_uninstall().

File

./media_acquiadam.install, line 26
Drupal install related hooks.

Code

function media_acquiadam_uninstall() {
  $del = [
    'media_acquiadam_client_id',
    'media_acquiadam_client_secret',
    'media_acquiadam_background_user',
    'media_acquiadam_background_pass',
    'media_acquiadam_client_mode',
    'media_acquiadam_cache_expiration',
    'media_acquiadam_unused_expiration',
    'media_acquiadam_extension_overrides',
  ];
  foreach ($del as $key) {
    variable_del($key);
  }
  if (db_field_exists('file_managed', 'acquiadam_id')) {
    $schema = drupal_get_schema('file_managed');
    db_drop_field('file_managed', 'acquiadam_id');
    db_drop_index('file_managed', 'fid_acquiadam_id');
  }
}