Révision 2c8c2b87
Ajouté par Assos Assos il y a presque 9 ans
drupal7/sites/all/modules/honeypot/honeypot.install | ||
---|---|---|
37 | 37 |
* Implements hook_install(). |
38 | 38 |
*/ |
39 | 39 |
function honeypot_install() { |
40 |
$t = get_t(); |
|
41 |
drupal_set_message($t("Honeypot installed successfully. Please !link to protect your forms from spam bots.", array( |
|
42 |
'!link' => l($t('configure Honeypot'), 'admin/config/content/honeypot'), |
|
43 |
))); |
|
40 |
// Create CSS file. |
|
41 |
honeypot_create_css(variable_get('honeypot_element_name', 'url')); |
|
42 |
|
|
43 |
if (!drupal_is_cli()) { |
|
44 |
$t = get_t(); |
|
45 |
drupal_set_message($t("Honeypot installed successfully. Please !link to protect your forms from spam bots.", array( |
|
46 |
'!link' => l($t('configure Honeypot'), 'admin/config/content/honeypot'), |
|
47 |
))); |
|
48 |
} |
|
44 | 49 |
} |
45 | 50 |
|
46 | 51 |
/** |
... | ... | |
56 | 61 |
cache_clear_all($table, 'cache'); |
57 | 62 |
} |
58 | 63 |
} |
64 |
|
|
65 |
// Delete 'honeypot' directory from public file directory. |
|
66 |
file_unmanaged_delete_recursive('public://honeypot'); |
|
59 | 67 |
} |
60 | 68 |
|
61 | 69 |
/** |
... | ... | |
129 | 137 |
db_create_table('honeypot_user', $table); |
130 | 138 |
} |
131 | 139 |
} |
140 |
|
|
141 |
/** |
|
142 |
* Create Honeypot CSS file. |
|
143 |
*/ |
|
144 |
function honeypot_update_7004() { |
|
145 |
module_load_include('inc', 'honeypot', 'honeypot.admin'); |
|
146 |
honeypot_create_css(variable_get('honeypot_element_name', 'url')); |
|
147 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules