Hi all,
I've created a patch that adds the $form_state parameter to various functions and also switches use of $_POST to be $form_state['values']. This helps reusing form functions from other code. Patch to follow (once I have the issue ID for the filename).
Please review.
Cheers!
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 435084_200904161504+1000.patch | 7.99 KB | sammys |
Comments
Comment #1
sammys commentedHere's the patch.
Comment #2
itsmahitha commentedComment #3
tr commentedWhat version of Ubercart did you apply the patch to ? The issue is marked 6.x-2.0-beta6.
Comment #4
longwaveThis patch changes the function signature of checkout pane callbacks, this will break all existing contrib modules that implement hook_checkout_pane, and therefore I do not think this should be implemented mid-release cycle.
I guess it would be possible to extend the checkout pane information arrays to identify whether they use the old or new function signature style and execute the callback accordingly - though that will also make the code somewhat more complicated.
Comment #5
tr commented@longwave: Yeah, that's what I was thinking too, any contrib that implements a checkout pane will break.
I'm not even sure the patch still applies, it's so old. Hence my question in #3.
I'm all in favor of the goal of the initial patch, but I suspect this will have to be done in the 7.x branch at this point in time. And since the whole checkout pane system is going to be reworked, I see this as more of an advisory about what to avoid rather than a patch that can be applied.
Comment #6
tr commentedComment #7
longwaveThis has changed in 7.x already, and we can't do this in 6.x at this stage.