You are here

function botcha_update_6201 in BOTCHA Spam Prevention 6.2

Same name and namespace in other branches
  1. 6.3 botcha.install \botcha_update_6201()

Create an interface to manage the list of forms that are forbidden to protect.

1 call to botcha_update_6201()
botcha_install in ./botcha.install
Implementation of hook_install().

File

./botcha.install, line 369

Code

function botcha_update_6201() {
  $ret = array();
  foreach (_botcha_default_form_ids() as $form_id) {
    $enabled = !in_array($form_id, array(
      'update_script_selection_form',
      'user_login',
      'user_login_block',
    ));
    Botcha::getForm($form_id, TRUE)
      ->setEnabled($enabled)
      ->save();

    // Clean the environment.
    Botcha::clean();
  }
  return $ret;
}