insert row if (!db_affected_rows()) { db_query(" INSERT INTO {captcha_points} ( form_id, module, type ) VALUES ( '%s', '%s', '%s' ) ", $form_id, $module, $type); } } } /** * Remove a CAPTCHA point. * * Removes the CAPTCHA point identified by the passed form identifier. * * @param $form_id * The identifier of the form to remove a CAPTCHA challenge. */ function install_captcha_remove_captcha_point($form_id) { db_query(" DELETE FROM {captcha_points} WHERE form_id = '%s' ", $form_id); } /** * Remove default CAPTCHA points. * * Removes all default CAPTCHA points installed by the module itself. */ function install_captcha_remove_default_captcha_points() { $defaults = array( 'comment_form', 'contact_mail_user', 'contact_mail_page', 'user_register', 'user_pass', 'user_login', 'user_login_block' ); foreach ($defaults as $form_id) { install_captcha_remove_captcha_point($form_id); } }