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!

CommentFileSizeAuthor
#1 435084_200904161504+1000.patch7.99 KBsammys

Comments

sammys’s picture

StatusFileSize
new7.99 KB

Here's the patch.

itsmahitha’s picture

Assigned: sammys » Unassigned
Status: Needs review » Reviewed & tested by the community
tr’s picture

What version of Ubercart did you apply the patch to ? The issue is marked 6.x-2.0-beta6.

longwave’s picture

Status: Reviewed & tested by the community » Needs work

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

tr’s picture

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

tr’s picture

Status: Needs work » Needs review
longwave’s picture

Status: Needs review » Closed (won't fix)

This has changed in 7.x already, and we can't do this in 6.x at this stage.