You are here

function _botcha_recipe1 in BOTCHA Spam Prevention 6

Same name and namespace in other branches
  1. 7 botcha.botcha.inc \_botcha_recipe1()

Botcha recipe.

1 string reference to '_botcha_recipe1'
_botcha_recipes in ./botcha.botcha.inc

File

./botcha.botcha.inc, line 192
Implementation of botcha form logic.

Code

function _botcha_recipe1($form, $secret, $error_field) {
  $myseed = 'itr_r1' . substr($secret, 0, 7);
  $spf = md5($myseed . substr('secret', 0, -4));
  $recipe = new stdClass();
  $recipe->name = 'noresubmit';
  $recipe->description = t('Prevent form resubmission');
  $recipe->description_bots = t('Bots will try to resubmit old form');
  $recipe->description_how = t('prepared form is remembered, and only one submission is allowed.');
  $recipe->error_field = $error_field;
  $recipe->error_text = t('Form session reuse detected.') . ' ' . t('An old form was submitted again, which may happen if it was retrieved from browser history using "Back" button.') . '<br />' . t('Please try again - fill all entries on this page without going "Back".');
  $recipe->proc = 'check_cache';
  return $recipe;
}