Instead of just passing in the event and the number of points, lets pass in the entire params array and allow other modules to have more fun with the points.
This patch adds the params array as a fifth argument onto the hook call, the origional number of points and event are left in place to maintain the API compatibility.
| Comment | File | Size | Author |
|---|---|---|---|
| add_params_to_hook.patch | 1.26 KB | mdixoncm |
Comments
Comment #1
jredding commented+1 (with exceptions)... yaaay!!
Your patch does this...
I understand that you were going for backward compatibility but its repeating a lot of data. What if we just shortened it to
and make this a distinguishing feature from version 5.x. I know that it will break a lot of contributed modules but that's OK as they need to be upgraded anyhow (and this little change is a minor coding point).
It makes it cleaner for the future....
Comment #2
mdixoncm commentedSounds perfect to me - yup I was only going for backwards compatibility to make things easier, but your method is definitely much better :)
Comment #3
jredding commentedimplemented in version 6