Patch attached.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 672912_spam_hook_init_v01.patch | 1.71 KB | kars-t |
| #1 | hook_init_fix.patch | 1.61 KB | Steve Dondley |
| hook_init_fix.patch | 816 bytes | Steve Dondley |
Patch attached.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 672912_spam_hook_init_v01.patch | 1.71 KB | kars-t |
| #1 | hook_init_fix.patch | 1.61 KB | Steve Dondley |
| hook_init_fix.patch | 816 bytes | Steve Dondley |
Comments
Comment #1
Steve Dondley commentedHere's a new patch that also cleans out unnecessary code from hook_init.
Comment #2
kars-t commentedHi
great idea! Rerolling patch against latest dev.
Comment #3
gnassar commentedOK, dumb question: what does this get us?
Comment #4
kars-t commentedCurrently it's just a function call at the start of the file. imho thats not a nice thing todo and drupal gives us a better way.
So we get cleaner code and maybe something could hook in an kick us form init.
Comment #5
gnassar commentedI'm sorry I missed this before. You have a point.
Does this still commit clean and work properly? I'm guessing so; don't think there have been a ton of changes to spam_init_api(). A quick check to make sure this doesn't need cleanup, and I'm guessing it's good to go.
Comment #6
AlexisWilke commentedYes. This fix is really good. I guess the old way was a 4.7 way of initializing a module. Ugly! Especially if you move to D7 and start writing tests for each function. When loading it would already run a function over which you'd have no control from your test code...
Thank you.
Alexis
Comment #7
gnassar commentedCommitted.
http://drupal.org/cvs?commit=471430
Thanks for the patch, guys!