You are here

contact_attach.install in Contact Attach 7

Same filename and directory in other branches
  1. 5 contact_attach.install
  2. 6 contact_attach.install

Uninstall and update functions for the Contact Attach module.

File

contact_attach.install
View source
<?php

/**
 * @file
 * Uninstall and update functions for the Contact Attach module.
 */

/**
 * Implements hook_uninstall().
 */
function contact_attach_uninstall() {
  variable_del('contact_attach_simple_field');
  variable_del('contact_attach_extensions_site');
  variable_del('contact_attach_extensions_user');
  variable_del('contact_attach_number_site');
  variable_del('contact_attach_number_user');
  variable_del('contact_attach_uploadsize_site');
  variable_del('contact_attach_uploadsize_user');
}

/**
 * Toggle usage of simple file field for users with file module enabled.
 *
 * The module now uses a managed file field if the file module is enabled.
 * Existing users are used to the simple file field so make sure this is not
 * changed under their noses. This toggle is available on the settings page.
 */
function contact_attach_update_7100() {
  if (module_exists('file')) {
    variable_set('contact_attach_simple_field', 1);
  }
}

Functions

Namesort descending Description
contact_attach_uninstall Implements hook_uninstall().
contact_attach_update_7100 Toggle usage of simple file field for users with file module enabled.