Comments

Steve Dondley’s picture

StatusFileSize
new1.61 KB

Here's a new patch that also cleans out unnecessary code from hook_init.

kars-t’s picture

Status: Active » Needs review
StatusFileSize
new1.71 KB

Hi

great idea! Rerolling patch against latest dev.

gnassar’s picture

OK, dumb question: what does this get us?

kars-t’s picture

Currently 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.

gnassar’s picture

I'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.

AlexisWilke’s picture

Status: Needs review » Reviewed & tested by the community

Yes. 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

gnassar’s picture

Status: Reviewed & tested by the community » Fixed

Committed.

http://drupal.org/cvs?commit=471430

Thanks for the patch, guys!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.