Closed (fixed)
Project:
Honeypot
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Nov 2011 at 15:09 UTC
Updated:
15 Jan 2012 at 05:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
geerlingguy commentedThanks for the patch! I haven't been using Honeypot on any webform-enabled sites lately, so I'll try to test this and make sure it works on D6 (and then D7... which will be different), then commit it.
Comment #2
geerlingguy commentedPatches go into D7 first, but it looks like it shouldn't be too difficult to get this working in both D6 and D7 at the same time...
(Also, marked #1377860: Drupal 7 Webform support as a duplicate. Patch there for D7.
Comment #3
geerlingguy commentedI'm taking a little different tack here, mostly for performance reasons—the elseif check should be a tiny bit faster, and would be cached on most sites so PHP would just need to run through the check once for each enabled form (if it doesn't match the first condition).
I may someday rewrite the integration for modules like Webform, simply because webform requires a little more work in the processing power department (strpos() is a lot more intense than simply checking a value for each checked form type). But probably not... this probably wouldn't make more than a 2-4ms difference on a normal page load :)
Attached patch works with D7 / Webform 3.15 (and earlier). Will work on making sure D6 backport works well too.
Comment #4
geerlingguy commentedGeica! Forgot to take out my first idea; that would've been double-trouble. Fixed patch attached. Will commit to D7.
Comment #5
geerlingguy commentedCommitted to D7: http://drupalcode.org/project/honeypot.git/commit/59999a7
(...and fixed mispatched code... http://drupalcode.org/project/honeypot.git/commit/03766d2)
Comment #6
geerlingguy commentedD6 backport (almost exactly the same) attached. Will commit in a minute, and mark this fixed. New release to be posted soon!
Comment #7
geerlingguy commentedCommitted to D6: http://drupalcode.org/project/honeypot.git/commit/5f8f238