Closed (fixed)
Project:
CAPTCHA
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Apr 2010 at 22:56 UTC
Updated:
3 Jan 2014 at 01:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
malclocke commentedI can't see any real value in having a three level cache for this array, perhaps I'm missing something. All the comments below are based on looking at the current release, 6.x-2.1
_captcha_get_captcha_placement is only called in two places, both in hook_form_alter() within captcha.module.
The $placement_map array is statically built and has just one element. It will only need to be allocated once per request because of the static var at the beginning of the function. That single allocation will almost certainly be faster than the bootstrap unserializing the array from the variable table.
I think the variable cache is just making the process more complicated than need be, particularly as there is not UI to modify the matchers, which is how I ended up here ...
Comment #2
malclocke commentedMy apologies, please ignore the comment above, it's too late at night. I now see the variable set appending the button positions to the cache.
Comment #3
soxofaan commentedhere's a patch that adds a button to the CAPTCHA admin page to flush the cache
Comment #4
soxofaan commented(tagging)
Comment #5
ukrdrupal commentedI added your patch, and I did see the button added in the admin. I tested it and it says it was successful. I logged out and cleared the browser cache. I revisited my contact form and the captcha is still below the "Send e-mail" button. How to fix this?
[EDIT]
Strike that! I refreshed the page again and to my surprise, the captcha was above the Send e-mail button! Good job!!! This is great!
Comment #6
soxofaan commented@ukrdrupal: thanks for testing
committed: http://drupal.org/cvs?commit=427840
to be ported to Drupal7 version
Comment #7
ukrdrupal commentedYou're welcome! I was extremely happy to find this nice patch! And I was even happier to see how nicely it works! :-)))
Comment #8
soxofaan commentedcommitted to D7 too: http://drupal.org/cvs?commit=471874