There were a few things to clean up. I have seen the issues dealing with the module update for 5.0, but I believe it is better to clean up first, then reconsider the API (names and parameters of the two hooks defined), then update for 5.0. This is a small module, and still there were quite a few 'problems' hidden in there.
- global $user where not needed
- variable_get() where not needed
- strtolower()-ing a number :)
- missing phpdoc comments
- untranslatable help
- misleading module description
- lots of Drupal coding style problems
- naming a function captcha_submit(), while this name is reserved for
hook_submit() and is called on node submissions
I have cleaned up these issues for Drupal 4.7, and we be happy to see these changes applied. IMHO this way the module looks a lot better as a starting point for a 5.0 upgrade.
There are also bugs in the code, which I intend to fix after this patch gets applied. (One bug is that the node_form is not really brought into the captcha system, since it's key is not properly identified)
| Comment | File | Size | Author |
|---|---|---|---|
| Captcha.cleanup.for.4.7.patch.txt | 9.57 KB | gábor hojtsy |
Comments
Comment #1
gábor hojtsyBy the way we run with this updated code at drupal.hu just fine (no new errors popped up after switching from the more messy code to this one :)
Comment #2
wundo commentedHi Gabor,
This patch still applies?
Sorry I missed it before.
Comment #3
soxofaan commentedAs the 4.7 version of CAPTCHA module is totally unmaintained/abandoned (and hopefully unused) now, I think it's best to just close this issue in an effort to clean up the issue queue.