You are here

security_review.install in Security Review 6

Same filename and directory in other branches
  1. 8 security_review.install
  2. 7 security_review.install

Install file for security_review module creates security_review table.

File

security_review.install
View source
<?php

/**
 * @file
 * Install file for security_review module creates security_review table.
 */

/**
 * Implementation of hook_install().
 */
function security_review_install() {
  drupal_install_schema('security_review');
}

/**
 * Implementation of hook_enable().
 */
function security_review_enable() {
  drupal_set_message(t('Security Review module enabled. You should first set the module access permissions at !link. Be sure to grant permissions to trusted users only as this module can show sensitive site information.', array(
    '!link' => l('admin/user/permissions', 'admin/user/permissions'),
  )));
}

/**
 * Implementation of hook_schema().
 */
function security_review_schema() {
  $schema['security_review'] = array(
    'fields' => array(
      'namespace' => array(
        'type' => 'varchar',
        'length' => 160,
        'not null' => TRUE,
        'default' => '',
      ),
      'reviewcheck' => array(
        'type' => 'varchar',
        'length' => 160,
        'not null' => TRUE,
        'default' => '',
      ),
      'result' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'lastrun' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'skip' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'skiptime' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'skipuid' => array(
        'type' => 'int',
        'default' => NULL,
      ),
    ),
    'primary key' => array(
      'namespace',
      'reviewcheck',
    ),
  );
  return $schema;
}

/**
 * Implementation of hook_uninstall().
 */
function security_review_uninstall() {
  drupal_uninstall_schema('security_review');
  variable_del('security_review_untrusted_roles');
  variable_del('security_review_log');
}

Functions

Namesort descending Description
security_review_enable Implementation of hook_enable().
security_review_install Implementation of hook_install().
security_review_schema Implementation of hook_schema().
security_review_uninstall Implementation of hook_uninstall().