system_status.install in System Status 7
Same filename and directory in other branches
Clean up file for system_status
File
system_status.installView source
<?php
/**
* @file
* Clean up file for system_status
*/
/**
* Implements hook_uninstall().
*
* Removes all settings used by the module.
*/
function system_status_uninstall() {
variable_del('system_status_service_allow_drupalstatus');
variable_del('system_status_public_allow_public');
variable_del('system_status_public_allow_ips');
variable_del('system_status_do_match_core');
variable_del('system_status_do_match_contrib');
variable_del('system_status_match_contrib_mode');
variable_del('system_status_preg_match_contrib');
variable_del('system_status_do_match_custom');
variable_del('system_status_preg_match_custom');
variable_del('system_status_token');
variable_del('system_status_need_protect_token');
variable_del('system_status_need_encryption');
variable_del('system_status_encrypt_token');
}
/**
* Implements hook_install().
*
* Creates a unique set of tokens for this installation.
*/
function system_status_install() {
variable_set('system_status_token', SystemStatusEncryption::getToken());
variable_set('system_status_encrypt_token', SystemStatusEncryption::getToken());
}
/**
* Creates an unique token.
*
* Tokens introduced in 7.x-1.x.
*/
function system_status_update_7200() {
if (variable_get('system_status_token', 0) === 0) {
variable_set('system_status_token', SystemStatusEncryption::getToken());
}
if (variable_get('system_status_encrypt_token', 0) === 0) {
variable_set('system_status_encrypt_token', SystemStatusEncryption::getToken());
}
}
Functions
Name | Description |
---|---|
system_status_install | Implements hook_install(). |
system_status_uninstall | Implements hook_uninstall(). |
system_status_update_7200 | Creates an unique token. |