watchdog_filtering.install in Watchdog Filtering 7
Same filename and directory in other branches
Install, update and uninstall functions for the watchdog_filtering module.
File
watchdog_filtering.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the watchdog_filtering module.
*/
/**
* Implements hook_install().
*/
function watchdog_filtering_install() {
$types = db_query('SELECT DISTINCT type FROM {watchdog}')
->fetchCol();
foreach ($types as $type) {
$type = rawurlencode($type);
$severity = variable_get('watchdog_filtering_severity_' . $type);
if ($severity === NULL) {
variable_set('watchdog_filtering_severity_' . $type, FALSE);
}
}
}
/**
* Implements hook_uninstall().
*/
function watchdog_filtering_uninstall() {
global $conf;
foreach ($conf as $key => $value) {
if (strpos($key, 'watchdog_filtering_') === 0) {
variable_del($key);
}
}
}
Functions
Name![]() |
Description |
---|---|
watchdog_filtering_install | Implements hook_install(). |
watchdog_filtering_uninstall | Implements hook_uninstall(). |