restrict_abusive_words.install in Restrict Abusive Words 7
Same filename and directory in other branches
Module install and update functions for the Restrict Abusive Words module.
File
restrict_abusive_words.installView source
<?php
/**
* @file
* Module install and update functions for the Restrict Abusive Words module.
*/
/**
* Implements hook_schema().
*/
function restrict_abusive_words_schema() {
$schema = array();
$schema['restrict_abusive_words'] = array(
'fields' => array(
'id' => array(
'description' => 'The ID of the abusive word.',
'type' => 'serial',
'not null' => TRUE,
),
'words' => array(
'description' => 'Abusive word.',
'type' => 'text',
'not null' => TRUE,
),
),
'primary key' => array(
'id',
),
);
return $schema;
}
/**
* Implements hook_uninstall().
*/
function restrict_abusive_words_uninstall() {
// Delete all variables related to this module.
variable_del('restrict_abusive_words_actions');
variable_del('restrict_abusive_words_user_roles');
variable_del('restrict_abusive_words_disable_user_roles');
variable_del('restrict_abusive_words_general_form');
variable_del('restrict_abusive_words_entity_node');
variable_del('restrict_abusive_words_entity_comment');
}
Functions
Name | Description |
---|---|
restrict_abusive_words_schema | Implements hook_schema(). |
restrict_abusive_words_uninstall | Implements hook_uninstall(). |