Révision 4019484b
Ajouté par Assos Assos il y a plus de 4 ans
drupal7/sites/all/modules/honeypot/honeypot.module | ||
---|---|---|
290 | 290 |
$honeypot_value = $element['#value']; |
291 | 291 |
|
292 | 292 |
// Make sure it's empty. |
293 |
if (!empty($honeypot_value)) { |
|
293 |
if (!empty($honeypot_value) || $honeypot_value == '0') {
|
|
294 | 294 |
_honeypot_log($form_state['values']['form_id'], 'honeypot'); |
295 | 295 |
form_set_error('', t('There was a problem with your form submission. Please refresh the page and try again.')); |
296 | 296 |
} |
... | ... | |
440 | 440 |
} |
441 | 441 |
$number = $query->countQuery()->execute()->fetchField(); |
442 | 442 |
|
443 |
// Don't add more than 30 days' worth of extra time.
|
|
444 |
$honeypot_time_limit = (int) min($honeypot_time_limit + exp($number) - 1, 2592000);
|
|
443 |
// Don't add more time than the expiration window.
|
|
444 |
$honeypot_time_limit = (int) min($honeypot_time_limit + exp($number) - 1, $expire_time);
|
|
445 | 445 |
$additions = module_invoke_all('honeypot_time_limit', $honeypot_time_limit, $form_values, $number); |
446 | 446 |
if (count($additions)) { |
447 | 447 |
$honeypot_time_limit += array_sum($additions); |
Formats disponibles : Unified diff
Weekly update of contrib modules