1
|
<?php
|
2
|
|
3
|
/**
|
4
|
* @file
|
5
|
* Provides install, updated, and uninstall functions for recaptcha.
|
6
|
*/
|
7
|
|
8
|
/**
|
9
|
* Implements hook_uninstall().
|
10
|
*/
|
11
|
function recaptcha_uninstall() {
|
12
|
// Delete all the recaptcha variables and then clear the variable cache.
|
13
|
db_delete('variable')
|
14
|
->condition('name', 'recaptcha_%', 'LIKE')
|
15
|
->execute();
|
16
|
cache_clear_all('variables', 'cache_bootstrap');
|
17
|
}
|
18
|
|
19
|
/**
|
20
|
* Implements hook_update_N().
|
21
|
*/
|
22
|
|
23
|
/**
|
24
|
* Issue #2473329: Remove obsolete variables.
|
25
|
*/
|
26
|
function recaptcha_update_7100() {
|
27
|
$variables = array(
|
28
|
'recaptcha_secure_connection',
|
29
|
'recaptcha_api_server',
|
30
|
'recaptcha_api_secure_server',
|
31
|
'recaptcha_verify_server',
|
32
|
);
|
33
|
foreach ($variables as $variable) {
|
34
|
variable_del($variable);
|
35
|
}
|
36
|
return t('Removed obsolete variables.');
|
37
|
}
|