You are here

auditfiles.install in Audit Files 7.3

Install, update and uninstall functions for the auditfiles module.

File

auditfiles.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the auditfiles module.
 */

/**
 * Implements hook_uninstall().
 */
function auditfiles_uninstall() {
  db_delete('variable')
    ->condition('name', 'auditfiles_%', 'LIKE')
    ->execute();
  cache_clear_all('variables', 'cache_bootstrap');
}

/**
 * Updates the inclusion and exclusion strings to use semi-colons.
 */
function auditfiles_update_7100() {
  $strings = array(
    'auditfiles_exclude_files' => '.htaccess',
    'auditfiles_exclude_extensions' => '',
    'auditfiles_exclude_paths' => 'color css ctools js',
    'auditfiles_include_domains' => '',
  );
  foreach ($strings as $key => $value) {
    $files = trim(variable_get($key, $value));
    if ($files) {
      $files = explode(' ', $files);
      if (count($files) > 1) {
        variable_set($key, implode(';', $files));
      }
    }
  }
}

Functions

Namesort descending Description
auditfiles_uninstall Implements hook_uninstall().
auditfiles_update_7100 Updates the inclusion and exclusion strings to use semi-colons.