function captcha_after_db_set_form in CAPTCHA After 6
Same name and namespace in other branches
- 7 captcha_after.module \captcha_after_db_set_form()
Saves captcha_after form settings in database.
4 calls to captcha_after_db_set_form()
- CaptchaAfterGlobalThresholdTestCase::doTestCaptchaAfterFloodingThreshold in ./
captcha_after.test - Testing of flooding threshold for node/add/page form.
- CaptchaAfterGlobalThresholdTestCase::testCaptchaAfterSubmitThreshold in ./
captcha_after.test - Testing of submit threshold for user login form.
- CaptchaAfterPerFormThresholdTestCase::testCaptchaAfterSubmitThreshold in ./
captcha_after.test - Testing of per form submit threshold for user login form.
- captcha_after_settings_form_submit in ./
captcha_after.admin.inc - CAPTCHA after settings form submit.
File
- ./
captcha_after.module, line 252 - Show CAPTCHA protection on selected forms after specified number of unsuccessful form submit attempts has been made.
Code
function captcha_after_db_set_form($form_id, array $options) {
$enable = $options['enable'];
unset($options['enable']);
db_query("DELETE FROM {captcha_after} WHERE form_id = '%s'", $form_id);
db_query("INSERT INTO {captcha_after} (form_id, enable, options) VALUES ('%s', %d, '%s')", $form_id, $enable, serialize($options));
}