1
|
<?php
|
2
|
|
3
|
/**
|
4
|
* @file
|
5
|
* Install, update, and uninstall functions for the Hidden CAPTCHA module.
|
6
|
*/
|
7
|
|
8
|
/**
|
9
|
* Implements hook_uninstall().
|
10
|
*
|
11
|
* Remove module variables, simulating variable_del().
|
12
|
*/
|
13
|
function hidden_captcha_uninstall() {
|
14
|
global $conf;
|
15
|
db_delete('variable')
|
16
|
->condition('name', 'hidden\_captcha\_%', 'LIKE')
|
17
|
->execute();
|
18
|
cache_clear_all('variables', 'cache_bootstrap');
|
19
|
foreach (array_keys($conf) as $name) {
|
20
|
if (strpos($name, 'hidden_captcha_') === 0) {
|
21
|
unset($conf[$name]);
|
22
|
}
|
23
|
}
|
24
|
}
|